A Godot Engine 4.3 example project demonstrating how to build a multi-layered navigation map using the built-in NavigationServer2D. Different enemy types (ground and flying) share a single navigation map by assigning navigation region layers based on obstacle tiles.
This project demonstrates two approaches to using different navigation layers for regions within a single navigation map:
- Creating navigation regions manually in code
- Automatically generating navigation regions from a tileset and updating their layers
Advantages:
- Full control over the creation process of navigation regions
- Navigation regions are created with the correct layers from the start
- The navigation map is updated only once when the regions are added
Disadvantages:
- The engine's built-in navigation debugging tools do not support regions created entirely via code
Advantages:
- The engine automatically handles the creation of navigation regions
- The built-in navigation debugging tools work correctly with engine-generated regions
Disadvantages:
- The navigation map is updated twice: once when the regions are created, and again when their layers are modified
This project uses custom node icons based on the open-source icon set from Phosphor Icons.
Phosphor is a flexible and open-source icon family for interfaces, diagrams, presentations — whatever, really.
Licensed under the MIT License.
This project is dedicated to the public domain under the Unlicense.