Navigation
Unreal Engine C++ API Reference > Runtime > Navmesh > Detour > dtNavMeshQuery
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 |
dtStatus findLocalNeighbourhood
&40;
dtPolyRef startRef,
const dtReal &42; centerPos,
const dtReal radius,
const dtQueryFilter &42; filter,
dtPolyRef &42; resultRef,
dtPolyRef &42; resultParent,
int &42; resultCount,
const int maxResult
&41; const
Remarks
Finds the non-overlapping navigation polygons in the local neighbourhood around the center position.
This method is optimized for a small search radius and small number of result polygons.
Candidate polygons are found by searching the navigation graph beginning at the start polygon.
The same intersection test restrictions that apply to the findPolysAroundCircle method applies to this method.
The value of the center point is used as the start point for cost calculations. It is not projected onto the surface of the mesh, so its y-value will effect the costs.
Intersection tests occur in 2D. All polygons and the search circle are projected onto the xz-plane. So the y-value of the center point does not effect intersection tests.
If the result arrays are is too small to hold the entire result set, they will be filled to capacity. The status flags for the query.
Parameters
Name | Description |
---|---|
startRef | The reference id of the polygon where the search starts. |
centerPos | The center of the query circle. [(x, y, z)] |
radius | The radius of the query circle. |
filter | The polygon filter to apply to the query. |
resultRef | The reference ids of the polygons touched by the circle. |
resultParent | The reference ids of the parent polygons for each result. Zero if a result polygon has no parent. [opt] |
resultCount | The number of polygons found. |
maxResult | The maximum number of polygons the result arrays can hold. |