Function AIBase.FinalizeMovement

FinalizeMovement (Vector3 nextPosition, Quaternion nextRotation)

Moves the agent to a position.

Public
void FinalizeMovement (

Vector3

nextPosition

New position of the agent.

Quaternion

nextRotation

New rotation of the agent. If enableRotation is false then this parameter will be ignored.

)

Moves the agent to a position.

This is used if you want to override how the agent moves. For example if you are using root motion with Mecanim.

This will use a CharacterController, Rigidbody, Rigidbody2D or the Transform component depending on what options are available.

The agent will be clamped to the navmesh after the movement (if such information is available, generally this is only done by the RichAI component).

See

MovementUpdate for some example code.

controller, rigid, rigid2D