Skip to content

Rewrite "Using navigation layers" page - #12222

Draft
Mickeon wants to merge 1 commit into
masterfrom
rewrite-navigation-using-navigationlayers
Draft

Mickeon wants to merge 1 commit into
masterfrom
rewrite-navigation-using-navigationlayers

Conversation

@Mickeon

@Mickeon Mickeon commented Aug 2, 2026

Copy link
Copy Markdown
Member

TL:DR: This particular page bothers me.

This PR currently exists as a draft just to showcase my intention.

@Mickeon Mickeon added enhancement area:manual Issues and PRs related to the Manual/Tutorials section of the documentation topic:navigation labels Aug 2, 2026
@Mickeon
Mickeon force-pushed the rewrite-navigation-using-navigationlayers branch from c51a1a2 to 61853ac Compare August 2, 2026 10:50

@AThousandShips AThousandShips left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a pass on pure format, will do a proper pass when it is ready otherwise

@Mickeon

Mickeon commented Aug 3, 2026

Copy link
Copy Markdown
Member Author

Yeah, I would like to first assess, perhaps with the help of @\smix8, if there's anything worth mentioning because this page is in an awkward spot. The whole thing about bitmask helpers is particularly out-of-place, but there's also a lot of minor details that I find odd.

@Mickeon
Mickeon force-pushed the rewrite-navigation-using-navigationlayers branch from 61853ac to ccdcb4c Compare August 3, 2026 13:18
@smix8

smix8 commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

The reason that page has all the manual bitmask examples is because the entire Godot documentation has/had none how to really use them in such context. So telling users to use an int as a bitmask with zero example or helpers around the entire engine was cursed documentation which is why it was added to that page here.

The most important part to mention about using navigation_layers is that they do not affect the geometry of a navigation map, they only affect what gets included or excluded within a path query.

The reason this is so important to mention and drive home is because users still think they can use those layers to stack all kinds of navmesh geometry all over each other. All that such stacking does is create bugs and performance problems, it never worked like that and never will. The point of navigation_layers is to filter things out on a specific query WITHOUT changing the entire navigation map geometry as that would be very performance heavy.

@Mickeon

Mickeon commented Aug 8, 2026 •

Copy link
Copy Markdown
Member Author

So telling users to use an int as a bitmask with zero example or helpers around the entire engine was cursed documentation which is why it was added to that page here.

This is exactly why one should, instead, make a page about bitmasks, even a bit of a shoddy one, that contains this information in a way that can be shared by multiple other pages. Putting it all here is a hacky solution and very hard one to find.
It doesn't help that the bit operations have the corresponding methods, which makes the example a bit moot because most users will be satisfied with this basic purpose.

The most important part to mention about using navigation_layers is that they do not affect the geometry of a navigation map, they only affect what gets included or excluded within a path query.

Since it's pertinent to path queries specifically, wouldn't all of this be better explained in "Using NavigationPathQuery objects" instead of having a whole separate page on navigation layers?

@Billy-The-Squid

Copy link
Copy Markdown

Just my two cents, but this is just one symptom of the entire navigation tutorial needing reorganization. I've got some additional ideas of how to do that in #12358


If a region has not a single compatible navigation layer with the ``navigation_layers`` parameter of a path query this regions navigation mesh will be skipped in pathfinding.
See :ref:`doc_navigation_using_navigationpaths` for more information on querying the NavigationServer for paths.
If a region does not have any compatible navigation layer with the ``navigation_layers``

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If a region does not have any compatible navigation layer with the ``navigation_layers``
If a region does not have any navigation layers that are compatible with the ``navigation_layers``

The wording still feels awkward

Changing the navigation layers of a navigation agent will have an immediate
effect on the next path query. Changing the navigation layers of
regions will have an effect after the next NavigationServer sync.
a region will have an effect after the next NavigationServer sync.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An example here might be helpful? Something to show the context/scenario in which this could be useful a little more concretely

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:manual Issues and PRs related to the Manual/Tutorials section of the documentation enhancement topic:navigation

4 participants