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 closestPointOnPolyBoundary
&40;
dtPolyRef ref,
const dtReal &42; pos,
dtReal &42; closest
&41; const
Remarks
Returns a point on the boundary closest to the source point if the source point is outside the polygon's xz-bounds.
Much faster than closestPointOnPoly().
If the provided position lies within the polygon's xz-bounds (above or below), then pos_ and
closest_ will be equal.
The height of `closest_ will be the polygon boundary. The height detail is not used.
`pos_ does not have to be within the bounds of the polybon or the navigation mesh. The status flags for the query.
Parameters
Name | Description |
---|---|
ref | The reference id to the polygon. |
pos | The position to check. [(x, y, z)] |
closest | The closest point. [(x, y, z)] |