dtNavMeshQuery::findDistanceToWall

Finds the distance from the specified position to the nearest polygon wall.

Windows
MacOS
Linux

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

Syntax

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

Returns

The status flags for the query.

Parameters

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)]

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss