dtNavMeshQuery::closestPointOnPolyBoundary

Returns a point on the boundary closest to the source point if the source point is outside the polygon's xz-bounds.

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 closestPointOnPolyBoundary
(
    dtPolyRef ref,
    const float * pos,
    float * closest
) 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.

Returns

The status flags for the query.

Parameters

Parameter

Description

ref

The reference id to the polygon.

pos

The position to check. [(x, y, z)]

closest

The closest 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