Navigation3D getting started
Get an agent pathfinding in 3D free space as quickly as possible: mount an SVO navigation volume, add a flight agent, run one flight query, and see the path in the viewport. The Gem does not ship ready-made volume assets—airspace comes from scene geometry via runtime build or offline bake. AutoBuild is the fastest starting point.
Prerequisites
Navigation3Dis enabled in the project (Project Manager orproject.json). After enablement,Navigation3DSystemComponentjoins the system entity automatically.- Geometry is available: the SVO volume gathers triangles through
RecastNavigationProviderServiceon the same entity (fromRecastNavigation, or a PhysX geometry provider). You usually also enableRecastNavigation. - If you use offline bake, AssetProcessor is running so
.svonavsources compile to.svonav_baked.
Minimal loop (five steps)
1 Enable the Gem
→ 2 Add SVO volume + geometry provider on an entity
→ 3 Add FlightNavigationComponent on the AI entity
→ 4 AutoBuild or Bake the SVO
→ 5 Query + verify with debug draw
1. Mount a navigation volume
Create a scene entity as the container for flyable space:
- Add SVO Navigation Volume (
SvoNavigationVolumeComponent/ editorEditorSvoNavigationVolumeComponent). - On the same entity, add a geometry provider that offers
RecastNavigationProviderService—it decides which triangles become obstacles. - Defaults are enough to start (full fields in Components):
| Field | Default | Purpose |
|---|---|---|
| Leaf voxel size | 0.5 | Finest sub-voxel edge length (meters) |
| Chunk size | 128.0 | World size of each SVO chunk (meters) |
| Radius tiers | { 0.5 } | Agent radius tiers baked into the SVO (meters) |
| Auto build | true | Build from geometry on activate (ignored if a baked asset is set) |
2. Add a flight agent
On the AI entity, add Flight Navigation (FlightNavigationComponent; Game menu only, no editor variant):
- Volume entity: point at the volume; leave empty to resolve by query point at runtime.
- Post processor:
Hover(default, omnidirectional) orFixedWing. - Agent: radius, max speed / accel, and kinematics that shape the trajectory (see Motion and following).
3. Make the SVO ready
- AutoBuild (fastest): with
Auto build = true, the volume voxelizes from the geometry provider on activate. Good for iteration. - Offline bake (preferred for shipping): editor Bake to asset →
.svonav→ AssetProcessor →.svonav_baked→ assign Baked asset. AutoBuild is ignored when a baked asset is set. See Authoring and baking.
When build / load finishes, NavigationVolumeNotificationBus::OnNavigationVolumeReady fires; you can also poll IsVolumeReady().
4. Run a query
Synchronous flight query:
#include <Navigation3D/FlightNavigationBus.h>
#include <Navigation3D/SvoPathTypes.h>
Navigation3D::FlightPath path;
Navigation3D::FlightNavigationRequestBus::EventResult(
path, agentEntityId,
&Navigation3D::FlightNavigationRequests::FindFlightPathBetweenPositions,
fromWorldPos,
toWorldPos);
if (!path.m_waypoints.empty())
{
// path.m_waypoints is a world-space polyline; path.m_length is total length (m)
}
For hybrid / multi-domain scenes prefer the unified facade: HybridNavigationComponent + NavigationQueryRequestBus::FindPath (double-precision world coordinates). Sync is fine for low frequency; use *Async for high frequency or large maps. See
Querying.
5. Enter game mode and verify
nav3d_debugDraw 1— paths / trajectories;nav3d_debugDraw 2— also SVO and occupied voxels.nav3d_debugAgent <entityId>— focus draw on one agent.nav3d_dumpStats— scheduler and per-volume stats.nav3d_validateVolume <volumeEntityId>— SVO invariant self-check.
More in Debugging.
Turn a trajectory into motion (optional)
Queries return path / trajectory data; they do not move the entity. To actually fly:
- Consume
m_waypoints/ the trajectory in your motion layer; or - Add
FlightPathFollowComponentand each frame readGetDesiredVelocity()into your rigid body / character controller (it never writes Transform). See Motion and following.
To feed desired velocity into a flight-control pipeline, see Flight.
Next steps
- Core concepts — SVO / chunk / tier / coordinates
- Components — full field tables
- Querying — ground + air + climb hybrid
- Authoring and baking — Bake, cost zones, takeoff links
- HTN integration — let AI decide when to take off