Navigation Regions

Navigation is the logic that determines how an agent move from Point A to Point B. Whether you are working in 2D or 3D, the core "brain" is the NavigationServer.

1. 2D Navigation (Top-Down / Side-Scroller)

In 2D, the logic follows the same "Server > Region > Agent" stack, but uses pixel coordinates rather than world units.

The 2D Hierarchy

The 2D Workflow

  1. Define the Area: Draw a NavigationPolygon inside your NavigationRegion2D to mark the walkable floor.
  2. Child Nodes: Just like in 3D, any static obstacles (like walls or pits) should be children of the Region so the baker can "carve" them out of the polygon.
  3. Pathfinding: Use the NavigationAgent2D to get the next position in the 2D plane.

2. 3D Navigation (FPS / Top-Down 3D)

In 3D, we deal with height, ramps, and complex geometry.

The 3D Hierarchy

The 3D Tree Setup

As seen in your level tree, everything you want the AI to "see" must be a child of the NavigationRegion3D:


Comparison Summary

Feature 2D Navigation 3D Navigation
Server NavigationServer2D NavigationServer3D
Mapping Tool NavigationPolygon NavigationMesh
Logic Pixels / Vector2 World Units / Vector3
Obstacles Static Polygons 3D Meshes / Baked Geometry