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 findPath
(
dtPolyRef startRef,
dtPolyRef endRef,
const float * startPos,
const float * endPos,
const float costLimit,
const dtQueryFilter * filter,
dtQueryResult & result,
float * totalCost
) const
Finds a path from the start polygon to the end polygon.
If the end polygon cannot be reached through the navigation graph, the last polygon in the path will be the nearest the end polygon.
If the path array is to small to hold the full result, it will be filled as far as possible from the start polygon toward the end polygon.
The start and end positions are used to calculate traversal costs. (The y-values impact the result.)
Parameter |
Description |
---|---|
startRef |
The reference id of the start polygon. |
endRef |
The reference id of the end polygon. |
startPos |
A position within the start polygon. [(x, y, z)] |
endPos |
A position within the end polygon. [(x, y, z)] |
costLimit |
Cost limit of nodes allowed to be added to the open list // |
filter |
The polygon filter to apply to the query. |
result |
Results for path corridor, fills in refs and costs for each poly from start to end |
totalCost |
If provided will get filled will total cost of path |