Question About 3D Navigation Regions:

Godot Version

4.2.2

Question

Right now I am making a 3D FPS game with pathfinding enemies. The tree looks like this:
image

In my game, whenever an objects position is changed (think of a large door opening), or an object is destroyed (exploding barrel deleting itself after animations), I want to update the navigation region to compensate.

So, in relation to this project, I have a questions. Within my project, is it normal for a navigation region to cover the entire level? To have many navigation regions all with the Node3D sub groups seems clunky. However, if the region covers the entire map, then updates to it may be expensive. Is there a way to update only part of a region?

The levels may be split up into different scenes/area like in games such as Half Life or Quake 2, so maybe this won’t be much of an issue.

If I do have multiple regions that may be a bit of a pain, since when starting a level or loading a save, you have a lot of iteration that needs to be done to reconnect signals, and all the objects in a level are deleted, so the ones saved in memory can be loaded in.

Thank you in advance for any advice!

Regions are the partition units of the navigation map. If you do not want to update the entire navmesh all at once on any change there is no way around using multiple regions instead of just one big region.

What a region uses as geometry when (re)baking navmesh depends on the navmesh parse settings and, if used, the baking bounds AABB / Rect.

So a lot depends already on how you actually build your level geometry. When build granular it will be easy to split nodes and objects up for each region. If it is just one big unwieldy node piece it will be a lost cause.

1 Like