dtNavMeshQuery::findNearestPoly2D

Finds the polygon 2D-nearest to the specified center point.

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 findNearestPoly2D
(
    const float * center,
    const float * extents,
    const dtQueryFilter * filter,
    dtPolyRef * outProjectedRef,
    float * outProjectedPt,
    const float * referencePt,
    float tolerance
) const

Remarks

Finds the polygon 2D-nearest to the specified center point.

Returns

The status flags for the query.

Parameters

Parameter

Description

center

The center of the search box. [(x, y, z)]

extents

The search distance along each axis. [(x, y, z)]

filter

The polygon filter to apply to the query.

nearestRef

The reference id of the nearest polygon.

nearestPt

The nearest point on the polygon. [opt] [(x, y, z)]

referencePt

If supplied replaces

center

in terms of distance measurements. [opt] [(x, y, z)]

tolerance

Radius around best 2D point for picking vertical match

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