dtNavMeshQuery::findPolysAroundShape

Finds the polygons along the naviation graph that touch the specified convex 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 findPolysAroundShape
(
    dtPolyRef startRef,
    const float * verts,
    const int nverts,
    const dtQueryFilter * filter,
    dtPolyRef * resultRef,
    dtPolyRef * resultParent,
    float * resultCost,
    int * resultCount,
    const int maxResult
) const

Remarks

Finds the polygons along the naviation graph that touch the specified convex polygon.

The order of the result set is from least to highest cost.

At least one result array must be provided.

A common use case for this method is to perform Dijkstra searches. Candidate polygons are found by searching the graph beginning at the start polygon.

The same intersection test restrictions that apply to findPolysAroundCircle() method apply to this method.

The 3D centroid of the search polygon is used as the start position for cost calculations.

Intersection tests occur in 2D. All polygons are projected onto the xz-plane. So the y-values of the vertices do not effect intersection tests.

If the result arrays are is too small to hold the entire result set, they will be filled to capacity.

Returns

The status flags for the query.

Parameters

Parameter

Description

startRef

The reference id of the polygon where the search starts.

verts

The vertices describing the convex polygon. (CCW) [(x, y, z) * nverts]

nverts

The number of vertices in the polygon.

filter

The polygon filter to apply to the query.

resultRef

The reference ids of the polygons touched by the search polygon. [opt]

resultParent

The reference ids of the parent polygons for each result. Zero if a result polygon has no parent. [opt]

resultCost

The search cost from the centroid point to the polygon. [opt]

resultCount

The number of polygons found.

maxResult

The maximum number of polygons the result arrays can hold.

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