Module |
|
Header |
/Engine/Source/Runtime/Navmesh/Public/Detour/DetourNavMeshQuery.h |
Include |
#include "Detour/DetourNavMeshQuery.h" |
Source |
/Engine/Source/Runtime/Navmesh/Private/Detour/DetourNavMeshQuery.cpp |
dtStatus moveAlongSurface
(
dtPolyRef startRef,
const float * startPos,
const float * endPos,
const dtQueryFilter * filter,
float * resultPos,
dtPolyRef * visited,
int * visitedCount,
const int maxVisitedSize
) const
Moves from the start to the end position constrained to the navigation mesh.
This method is optimized for small delta movement and a small number of polygons. If used for too great a distance, the result set will form an incomplete path.
resultPos_ will equal the
endPos_ if the end is reached. Otherwise the closest reachable position will be returned.
`resultPos_ is not projected onto the surface of the navigation mesh. Use getPolyHeight if this is needed.
This method treats the end position in the same manner as the raycast method. (As a 2D point.) See that method's documentation for details.
If the `visited_ array is too small to hold the entire result set, it will be filled as far as possible from the start position toward the end position.
The status flags for the query.
Parameter |
Description |
---|---|
startRef |
The reference id of the start polygon. |
startPos |
A position of the mover within the start polygon. [(x, y, x)] |
endPos |
The desired end position of the mover. [(x, y, z)] |
filter |
The polygon filter to apply to the query. |
resultPos |
The result position of the mover. [(x, y, z)] |
visited |
The reference ids of the polygons visited during the move. |
visitedCount |
The number of polygons visited during the move. |
maxVisitedSize |
The maximum number of polygons the visited array can hold. |