dtNavMeshQuery::closestPointOnPoly

Finds the closest point on the specified polygon.

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

Remarks

Finds the closest point on the specified polygon.

Uses the detail polygons to find the surface height. (Most accurate.)

`pos_ does not have to be within the bounds of the polygon or navigation mesh.

See closestPointOnPolyBoundary() for a limited but faster option.

Returns

The status flags for the query.

Parameters

Parameter

Description

ref

The reference id of the polygon.

pos

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

closest

The closest point on the polygon. [(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