Navigation
API > API/Runtime > API/Runtime/Navmesh > API/Runtime/Navmesh/Detour > API/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 findRandomPoint
(
const dtQueryFilter * filter,
float(*)() frand,
dtPolyRef * randomRef,
dtReal * randomPt
) const
Remarks
Returns random location on navmesh. Polygons are chosen weighted by area. The search runs in linear related to number of polygon. The status flags for the query.
Parameters
| Name | Description |
|---|---|
| filter | The polygon filter to apply to the query. |
| frand | Function returning a random number [0..1). |
| randomRef | The reference id of the random location. |
| randomPt | The random location. |