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

Moves from the start to the end point constrained to the navigation mesh.

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

Syntax

         
 C#  Visual Basic  Visual C++ 
public NavStatus MoveAlongSurface(
	NavmeshPoint start,
	Vector3 end,
	NavmeshQueryFilter filter,
	out Vector3 resultPoint,
	uint[] visitedPolyRefs,
	out int visitedCount
)
Public Function MoveAlongSurface ( _
	start As NavmeshPoint, _
	end As Vector3, _
	filter As NavmeshQueryFilter, _
	<OutAttribute> ByRef resultPoint As Vector3, _
	visitedPolyRefs As UInteger(), _
	<OutAttribute> ByRef visitedCount As Integer _
) As NavStatus
public:
NavStatus MoveAlongSurface(
	NavmeshPoint start, 
	Vector3 end, 
	NavmeshQueryFilter^ filter, 
	[OutAttribute] Vector3% resultPoint, 
	array<unsigned int>^ visitedPolyRefs, 
	[OutAttribute] int% visitedCount
)

Parameters

start
NavmeshPoint
A position within the start polygon.
end
Vector3
The end position.
filter
NavmeshQueryFilter
The filter to apply to the query.
resultPoint
Vector3%
The result point from the move.
visitedPolyRefs
array<UInt32>[]()[][]
The references of the polygons visited during the move. [(polyRef) * visitedCount]
visitedCount
Int32%
The number of polygons visited during the move.

Return Value

The NavStatus flags for the query.

Remarks

This method is optimized for small delta movement and a small number of polygons. If used for too great a distance, the result will form an incomplete path.

The result point will equal the end point if the end is reached. Otherwise the closest reachable point will be returned.

The result position is not projected to the surface of the navigation mesh. If that is needed, use GetPolyHeight(NavmeshPoint, Single%).

This method treats the end point in the same manner as the Raycast(NavmeshPoint, Vector3, NavmeshQueryFilter, Single%, Vector3%, array<UInt32>[]()[][], Int32%) method. (As a 2D point.) See that method's documentation for details on the impact.

If the result buffer is too small to hold the entire result, it will be filled as far as possible from the start point toward the end point.

See Also