Navigation
API > API/Runtime > API/Runtime/Navmesh > API/Runtime/Navmesh/dtNavMeshQuery
Description
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.
| Name | closestPointOnPolyBoundary |
| Type | function |
| Header File | /Engine/Source/Runtime/Navmesh/Public/Detour/DetourNavMeshQuery.h |
| Include Path | #include "Detour/DetourNavMeshQuery.h" |
| Source | /Engine/Source/Runtime/Navmesh/Private/Detour/DetourNavMeshQuery.cpp |
dtStatus closestPointOnPolyBoundary
(
dtPolyRef ref,
const dtReal * pos,
dtReal * closest
) const
The status flags for the query.
Parameters
| Name | Remarks |
|---|---|
| ref | The reference id to the polygon. |
| pos | The position to check. [(x, y, z)] |
| closest | The closest point. [(x, y, z)] |