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

Moves the position from its current location to the desired location, adjusting the corridor as needed to reflect the new position.

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


 C#  Visual Basic  Visual C++ 
public NavmeshPoint MovePosition(
	Vector3 desiredPosition
Public Function MovePosition ( _
	desiredPosition As Vector3 _
) As NavmeshPoint
NavmeshPoint MovePosition(
	Vector3 desiredPosition


The desired position.

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 first polygon.

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

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

See Also