Module |
|
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
(
dtPolyRef startRef,
const float * centerPos,
const float radius,
const dtQueryFilter * filter,
dtPolyRef * resultRef,
dtPolyRef * resultParent,
int * resultCount,
const int maxResult
) const
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.
Parameter |
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. |