The NavMeshAgent class in the Sandbox
namespace is a component that allows an agent to navigate the navmesh defined in the scene. It provides various properties and methods to control the agent's movement, speed, and pathfinding capabilities.
The NavMeshAgent class in the Sandbox
namespace is a component that allows an agent to navigate the navmesh defined in the scene. It provides various properties and methods to control the agent's movement, speed, and pathfinding capabilities.
Member Name | Summary |
---|---|
SetAgentPosition | If you want to move the agent from one position to another |
MoveTo | Navigate to the position |
Stop | Stop moving, or whatever we're doing |
GetLookAhead | Get a point on the current path, distance away from here. This is a simplified path so only includes the first few corners. |
Member Name | Summary |
---|---|
Height | Physical height of the agent. |
Radius | Physical radius of the agent. |
MaxSpeed | Maximum speed the agent can move. |
Acceleration | The maximum acceleration a agent can have. This is how fast the agent can change its velocity. If you want snappy movement this should be as high or higher than MaxSpeed. |
UpdatePosition | Set the Position of the GameObject to the agent position every frame. You can turn this off and handle it yourself by using the AgentPosition property. |
UpdateRotation | This will simply face the direction it is moving. It is not configurable on purpose, so you should really turn this off and be doing this yourself if you need it to do anything specific. |
Separation | Controls the separation behavior of the agent to avoid other agents. |
AgentPosition | Updated with the agent's position, even if UpdatePosition is false |
TargetPosition | The target position the agent is moving towards. |
Velocity | The current velocity of the agent. |
WishVelocity | The desired velocity of the agent. |
SyncAgentPosition | Obsolete. Synchronizes the agent's position. |