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 findDistanceToWall
&40;
dtPolyRef startRef,
const dtReal &42; centerPos,
const dtReal maxRadius,
const dtQueryFilter &42; filter,
dtReal &42; hitDist,
dtReal &42; hitPos,
dtReal &42; hitNormal
&41; const
Remarks
Finds the distance from the specified position to the nearest polygon wall.
`hitPos_ is not adjusted using the height detail data.
hitDist_ will equal the search radius if there is no wall within the radius. In this case the values of
hitPos_ and `hitNormal_ are undefined.
The normal will become unpredicable if `hitDist_ is a very small number. The status flags for the query.
Parameters
Name | Description |
---|---|
startRef | The reference id of the polygon containing centerPos. |
centerPos | The center of the search circle. [(x, y, z)] |
maxRadius | The radius of the search circle. |
filter | The polygon filter to apply to the query. |
hitDist | The distance to the nearest wall from centerPos. |
hitPos | The nearest position on the wall that was hit. [(x, y, z)] |
hitNormal | The normalized ray formed from the wall point to the source point. [(x, y, z)] |