Function Agent.SetCollisionNormal

SetCollisionNormal (Vector3 normal)

Set the normal of a wall (or something else) the agent is currently colliding with.

Public
void SetCollisionNormal (

Vector3

normal

)

Set the normal of a wall (or something else) the agent is currently colliding with.

This is used to make the RVO system aware of things like physics or an agent being clamped to the navmesh. The velocity of this agent that other agents observe will be modified so that there is no component into the wall. The agent will however not start to avoid the wall, for that you will need to add RVO obstacles.

This value will be cleared after the next simulation step, normally it should be set every frame when the collision is still happening.