Function Agent.ForceSetVelocity

ForceSetVelocity (Vector3 velocity)

Set the current velocity of the agent.

Public
void ForceSetVelocity (

Vector3

velocity

)

Set the current velocity of the agent.

This will override the local avoidance input completely. It is useful if you have a player controlled character and want other agents to avoid it.

Calling this method will mark the agent as being externally controlled for 1 simulation step. Local avoidance calculations will be skipped for the next simulation step but will be resumed after that unless this method is called again.