FNavQuerySession
A private read-only path-query handle over a baked nav mesh, so jobs can path many NPCs in parallel. The mesh's own shared dtNavMeshQuery keeps node state between calls and is not safe to touch from two threads; each session owns its own query object instead, and Detour's mesh reads are const.
- Module
- AINavigation
- Header
#include "AINavigation/NavQuerySession.h"- Namespace
Mowo
Contract: one session per thread (a session itself is not re-entrant), and the mesh must not change while any session is mid-query. Tile-cache updates and obstacle changes run on the game thread, so take the sessions' work inside one job batch that finishes before NavAgentSystem next updates.
Constructors
| Signature | Name | Description |
|---|---|---|
explicit FNavQuerySession(Ref<NavMeshAsset> nav) | FNavQuerySession | |
~FNavQuerySession() | ~FNavQuerySession | |
FNavQuerySession(const FNavQuerySession&) = delete | FNavQuerySession |
Public functions
| Returns | Name | Description |
|---|---|---|
FNavQuerySession& | operator= | |
bool | IsValid | |
bool | FindPath | Straight-line corner path between the polygons nearest the two points, using the same scene-wide area costs as NavAgentSystem's single-agent fallback. |
Function details
FNavQuerySession
explicit FNavQuerySession(Ref<NavMeshAsset> nav)~FNavQuerySession
~FNavQuerySession()FNavQuerySession
FNavQuerySession(const FNavQuerySession&) = deleteoperator=
FNavQuerySession& operator=(const FNavQuerySession&) = deleteIsValid
bool IsValid() constFindPath
bool FindPath(const Vec3& start, const Vec3& end, std::vector<Vec3>& outWaypoints)Straight-line corner path between the polygons nearest the two points, using the same scene-wide area costs as NavAgentSystem's single-agent fallback. False when either end is off the mesh or no route exists.