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 findDistanceToWall
(
dtPolyRef startRef,
const float * centerPos,
const float maxRadius,
const dtQueryFilter * filter,
float * hitDist,
float * hitPos,
float * hitNormal
) const
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.
Parameter |
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)] |