ModuleNavigation

Manages navmesh-based navigation using Recast/Detour. Allows building navigation meshes, querying paths, and applying dynamic blockers.

Overview

Wraps dtNavMesh / dtNavMeshQuery loaded from scene navmesh assets or built at runtime via NavMeshBuilder (Recast pipeline in ModuleNavigation.cpp).

Collects NavModifierVolume / runtime blockers from scene components. Exposes findStraightPath, runtime blocker tests, debug polyline generation, IDebugDrawable integration in DebugDrawPass.

Agent profiles map to Detour include flags.

Navmesh pathfinding visualization with a computed route in the scene
Navmesh pathfinding visualization with a computed route in the scene
Navmesh authoring settings in the scene configuration panel
Navmesh generation settings in the editor

How it works

  • Navmesh data is loaded from scene assets or built per scene via Recast.
  • Runtime modifier/blocker volumes update queryable navigation.
  • Path queries use Detour; debug geometry draws through DebugDrawPass.

Internal architecture

ModuleNavigation
├── NavMeshBuilder (Recast)
├── Detour nav mesh + query
├── Runtime modifier/blocker volumes
├── Path debug + draw lines
└── Editor build/load per scene name

Relationships

  • Scene::m_navMesh asset reference; ModuleScene static quadtree includes NAVMESH layer; editor nav tool in ModuleEditor.

Technical features

  • Recast build pipeline and Detour runtime queries.
  • Dynamic blockers and modifier volumes.
  • Debug draw integration for navmesh and paths.

Implementation notes

  • Verified: Detour integration, build API, debug draw registration.