A* Pathfinding Project
3.8.5
The A* Pathfinding Project for Unity 3D
|
Exposes properties of an Agent class. More...
Exposes properties of an Agent class.
Public Member Functions | |
void | SetYPosition (float yCoordinate) |
Sets the Y coordinate of the agent only. | |
void | Teleport (Vector3 pos) |
Teleports the agent to a new position. | |
Properties | |
float | AgentTimeHorizon [get, set] |
Max number of estimated seconds to look into the future for collisions with agents. | |
RVOLayer | CollidesWith [get, set] |
Layer mask specifying which layers this agent will avoid. | |
bool | DebugDraw [get, set] |
Debug drawing. | |
Vector3 | DesiredVelocity [get, set] |
Desired velocity of the agent. | |
float | Height [get, set] |
Height of the agent. | |
Vector3 | InterpolatedPosition [get] |
Interpolated position of agent. | |
RVOLayer | Layer [get, set] |
Specifies the avoidance layer for this agent. | |
bool | Locked [get, set] |
Locked agents will not move. | |
int | MaxNeighbours [get, set] |
Max number of agents to take into account. | |
float | MaxSpeed [get, set] |
Max speed of the agent. | |
float | NeighbourDist [get, set] |
Max distance to other agents to take them into account. | |
List< ObstacleVertex > | NeighbourObstacles [get] |
List of obstacle segments which were close to the agent during the last simulation step. | |
float | ObstacleTimeHorizon [get, set] |
Max number of estimated seconds to look into the future for collisions with obstacles. | |
Vector3 | Position [get] |
Position of the agent. | |
float | Radius [get, set] |
Radius of the agent. | |
Vector3 | Velocity [get, set] |
Velocity of the agent. | |
void SetYPosition | ( | float | yCoordinate | ) |
Sets the Y coordinate of the agent only.
This will not interfere with local avoidance like when using the Teleport method so this is the recommended way to adjust the position of the agent based on e.g how the ground looks.
void Teleport | ( | Vector3 | pos | ) |
Teleports the agent to a new position.
Just setting the position can cause strange effects when using interpolation.
|
getset |
Max number of estimated seconds to look into the future for collisions with agents.
As it turns out, this variable is also very good for controling agent avoidance priorities. Agents with lower values will avoid other agents less and thus you can make 'high priority agents' by giving them a lower value.
|
getset |
Layer mask specifying which layers this agent will avoid.
You can set it as CollidesWith = RVOLayer.DefaultAgent | RVOLayer.Layer3 | RVOLayer.Layer6 ...
|
getset |
Debug drawing.
|
getset |
Desired velocity of the agent.
Usually you set this once per frame. The agent will try move as close to the desired velocity as possible. Will take effect at the next simulation step.
|
getset |
Height of the agent.
|
get |
Interpolated position of agent.
This is the recommended way of reading the position of an agent. Will be interpolated if the interpolation setting is enabled on the simulator.
|
getset |
Specifies the avoidance layer for this agent.
The CollidesWith mask on other agents will determine if they will avoid this agent.
|
getset |
Locked agents will not move.
|
getset |
Max number of agents to take into account.
Decreasing this value can lead to better performance, increasing it can lead to better quality of the simulation.
|
getset |
Max speed of the agent.
In units per second
|
getset |
Max distance to other agents to take them into account.
Decreasing this value can lead to better performance, increasing it can lead to better quality of the simulation.
|
get |
List of obstacle segments which were close to the agent during the last simulation step.
Can be used to apply additional wall avoidance forces for example. Segments are formed by the obstacle vertex and its .next property.
|
getset |
Max number of estimated seconds to look into the future for collisions with obstacles.
|
get |
Position of the agent.
This cannot be changed manually. Use the Teleport method if you want to change the position of the agent, note that this should not be done during normal navigation since doing it effectively disables local avoidance.
|
getset |
Radius of the agent.
Agents are modelled as circles/cylinders
|
getset |
Velocity of the agent.
Can be used to set the rotation of the rendered agent. But smoothing is recommended if you do so since it might be a bit unstable when the velocity is very low.
You can set this variable manually,but it is not recommended to do so unless you have good reasons since it might degrade the quality of the simulation.