[This is preliminary documentation and is subject to change.]

Moves the target from its curent location to the desired location, adjusting the corridor as needed to reflect the change.

Namespace: org.critterai.nav
Assembly: cai-nav (in cai-nav.dll) Version: (


 C#  Visual Basic  Visual C++ 
public NavmeshPoint MoveTarget(
	Vector3 desiredTarget
Public Function MoveTarget ( _
	desiredTarget As Vector3 _
) As NavmeshPoint
NavmeshPoint MoveTarget(
	Vector3 desiredTarget


The desired target.

Return Value

The result of the move.



  • The movement is constrained to the surface of the navigation mesh.
  • The corridor is automatically adjusted (shorted or lengthened) and Corners updated in order to remain valid.
  • The new position will be located in the adjusted corridor's last polygon.

The expected use case: The desired target will be 'near' the corridor. What is considered 'near' depends on local polygon density, query search extents, etc.

The resulting target will differ from the desired target if the desired target is not on the navigation mesh, or it can't be reached using a local search.

See Also