A* Pathfinding Project
4.3.4
The A* Pathfinding Project for Unity 3D
|
RVO Character Controller. More...
RVO Character Controller.
Designed to be used as a drop-in replacement for the Unity Character Controller, it supports almost all of the same functions and fields with the exception that due to the nature of the RVO implementation, desired velocity is set in the Move function and is assumed to stay the same until something else is requested (as opposed to reset every frame).
For documentation of many of the variables of this class: refer to the Pathfinding.RVO.IAgent interface.
Public Member Functions | |
void | Update () |
Public Member Functions inherited from RVOController | |
Vector3 | CalculateMovementDelta (float deltaTime) |
Direction and distance to move in a single frame to avoid obstacles. More... | |
Vector3 | CalculateMovementDelta (Vector3 position, float deltaTime) |
Direction and distance to move in a single frame to avoid obstacles. More... | |
void | ForceSetVelocity (Vector3 velocity) |
void | Move (Vector3 vel) |
Set the desired velocity for the agent. More... | |
void | SetCollisionNormal (Vector3 normal) |
Set the normal of a wall (or something else) the agent is currently colliding with. More... | |
void | SetTarget (Vector3 pos, float speed, float maxSpeed) |
Set the target point for the agent to move towards. More... | |
void | Teleport (Vector3 pos) |
Teleport the agent to a new position. More... | |
Vector2 | To2D (Vector3 p) |
Converts a 3D vector to a 2D vector in the movement plane. More... | |
Vector2 | To2D (Vector3 p, out float elevation) |
Converts a 3D vector to a 2D vector in the movement plane. More... | |
Vector3 | To3D (Vector2 p, float elevationCoordinate) |
Converts a 2D vector in the movement plane as well as an elevation to a 3D coordinate. More... | |
Public Attributes | |
new bool | enableRotation = true |
new LayerMask | mask = -1 |
Layer mask for the ground. More... | |
new float | rotationSpeed = 30 |
Public Attributes inherited from RVOController | |
float | agentTimeHorizon = 2 |
How far into the future to look for collisions with other agents (in seconds) More... | |
RVOLayer | collidesWith = (RVOLayer)(-1) |
Layer mask specifying which layers this agent will avoid. More... | |
bool | debug |
Enables drawing debug information in the scene view. More... | |
float | flowFollowingStrength = 0.0f |
Determines how strongly this agent just follows the flow instead of making other agents avoid it. More... | |
RVOLayer | layer = RVOLayer.DefaultAgent |
Specifies the avoidance layer for this agent. More... | |
bool | locked |
A locked unit cannot move. More... | |
bool | lockWhenNotMoving = false |
Automatically set locked to true when desired velocity is approximately zero. More... | |
int | maxNeighbours = 10 |
Max number of other agents to take into account. More... | |
float | obstacleTimeHorizon = 2 |
How far into the future to look for collisions with obstacles (in seconds) More... | |
float | priority = 0.5f |
How strongly other agents will avoid this agent. More... | |
float | priorityMultiplier = 1.0f |
Priority multiplier. More... | |
float | wallAvoidFalloff = 1 |
How much the wallAvoidForce decreases with distance. More... | |
float | wallAvoidForce = 1 |
An extra force to avoid walls. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from RVOController | |
override int | OnUpgradeSerializedData (int version, bool unityThread) |
Handle serialization backwards compatibility. More... | |
void | UpdateAgentProperties () |
Protected Member Functions inherited from VersionedMonoBehaviour | |
virtual void | Awake () |
virtual void | Reset () |
Handle serialization backwards compatibility. More... | |
Protected Attributes inherited from RVOController | |
Transform | tr |
Cached tranform component. More... | |
Package Attributes inherited from RVOController | |
float | radiusBackingField = 0.5f |
Properties inherited from RVOController | |
IAstarAI | ai [get, set] |
Cached reference to a movement script (if one is used) More... | |
float | center [get, set] |
Center of the agent relative to the pivot point of this game object. More... | |
bool | enableRotation [get, set] |
float | height [get, set] |
Height of the agent in world units. More... | |
LayerMask | mask [get, set] |
float | maxSpeed [get, set] |
MovementPlane | movementPlane [get] |
Determines if the XY (2D) or XZ (3D) plane is used for movement. More... | |
Vector3 | position [get] |
Current position of the agent. More... | |
float | radius [get, set] |
Radius of the agent in world units. More... | |
float | rotationSpeed [get, set] |
IAgent | rvoAgent [get, private set] |
Reference to the internal agent. More... | |
ISimulator | simulator [get, private set] |
Reference to the rvo simulator. More... | |
Vector3 | velocity [get, set] |
Current calculated velocity of the agent. More... | |
Properties inherited from VersionedMonoBehaviour | |
int Util.IEntityIndex. | EntityIndex [get, set] |
Internal entity index used by #BurstBatchHelper. More... | |
Properties inherited from IEntityIndex | |
int | EntityIndex [get, set] |
void Update | ( | ) |
new bool enableRotation = true |
new LayerMask mask = -1 |
Layer mask for the ground.
The RVOController will raycast down to check for the ground to figure out where to place the agent.
new float rotationSpeed = 30 |