Navigation3D HTN integration
When
HTN Planner is also enabled, Navigation3D registers Nav3D.* flight / move operators and a sensor so the planner can treat “fly somewhere / take off / land / move on ground” as atomic tasks. gem.json does not hard-depend on HtnPlanner—the adapter builds and loads only when both Gems are enabled.
Six operators
| Operator ID | Domain | First arg | Purpose |
|---|---|---|---|
Nav3D.FlyTo | Air (Hybrid optional) | TargetPos | Fly to a position |
Nav3D.FlyToEntity | Air | TargetEntity | Fly to an entity |
Nav3D.TakeOff | Hybrid | — (optional TakeoffLink) | Take off; sets Self.IsAirborne = true |
Nav3D.Land | Hybrid | — (optional landing point) | Land; clears Self.IsAirborne |
Nav3D.MoveTo | Ground | TargetPos | Ground move to a position |
Nav3D.MoveToEntity | Ground | TargetEntity | Ground move to an entity |
Execution model (summary)
Begin → FindPathAsync
→ OnPathReady
├─ Air segment → FlightPathFollow.StartFollowing → OnPathCompleted → next or Success
├─ Ground segment → ProjectProvided immediate success, or SimpleWaypoint advance
└─ Failure / OnPathBlocked / Deviated / AvoidanceFailed → Failed
Abort → cancel query and stop following
Hybrid paths may contain multiple Air segments followed in order.
.htnnode presets
Under Assets/HtnNodes/:
| Preset | Notes |
|---|---|
FlyTo.htnnode | TargetPos + CruiseAltitude (default 30) |
FlyToEntity.htnnode | Target entity |
TakeOff.htnnode | HoverHeight 10, allowFreeVerticalTransfer true; optional TakeoffLink |
Land.htnnode | Landing point |
MoveTo / MoveToEntity have no presets—C++ registration only.
FlightAgentSensorComponent
Maintains WorldState keys the planner reads:
| Key | Meaning |
|---|---|
Self.IsAirborne | Whether airborne |
Self.CanFly | Static flight capability |
Self.Position | Self position |
Self.NearestLandingPad | Nearest landable domain link |
Minimal HTN flight-agent setup
HtnAgentComponent(domain + plan / execute)HybridNavigationComponent(Nav3D.*query facade)FlightPathFollowComponent(Air-segment follow)- Recommended:
FlightAgentSensorComponent - Scene: SVO volume + ground Detour navmesh
- Takeoff / land:
NavigationDomainLinkComponent, or Hybrid Free vertical transfer
Next steps
- HTN Planner user guide — Domain, WorldState, debugging
- Motion and following — follow / avoidance parameters
- Programmatic API — pathfind without HTN