Navigation
Unreal Engine C++ API Reference > Runtime > Navmesh > Detour > dtNavMeshQuery
References
Module | Navmesh |
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
&40;
dtPolyRef startRef,
dtPolyRef endRef,
const dtReal &42; startPos,
const dtReal &42; endPos,
const dtReal costLimit,
const dtQueryFilter &42; filter,
dtQueryResult & result,
dtReal &42; totalCost
&41; const
Remarks
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.)
Parameters
Name | 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 |