Godot 4 NavigationServer3D: the three ways a "broken navmesh" is the API doing what it says (4.7.2, proof project included) MIT source

2 months ago by Stratos to c/godot

Use NavigationServer3D directly in Godot 4. Query a map RID, wait for synchronization, diagnose short paths, and inspect query metadata.

TIL NavigationServer3D.map_get_path() in Godot 4 stops searching after 4096 polygons by default. On a big navmesh the path just ends short and looks like a disconnected island.

KingThrillgore 2 points 2 months ago

Is this a known issue if its that bad? I can see a lot of environments eclipsing 4096 polys

path: 0 25485965, hotness: undefined, score: 2, children: 1
Vav_Labs 2 points 2 months ago

It's documented behavior rather than a bug, but it's easy to miss because the doc lives on a different class than the one people call.

The nasty part is what happens when the cap hits. Per the docs, the search / resets and builds a path from the start polygon to the polygon that was found closest to the target position so far. So you don't get an empty path or an error you get a plausible-looking path that ends short. That reads exactly like a disconnected island.

path: 0 25485965 25489385, hotness: undefined, score: 2, children: 0
godot
godot

@programming.dev

login for more options
7968
1189
529

Welcome to the programming.dev Godot community!

This is a place where you can discuss about anything relating to the Godot game engine. Feel free to ask questions, post tutorials, show off your godot game, etc.

Make sure to follow the Godot CoC while chatting

We have a matrix room that can be used for chatting with other members of the community here

Links

Other Communities

Rules

  • Posts need to be in english
  • Posts with explicit content must be tagged with nsfw
  • We do not condone harassment inside the community as well as trolling or equivalent behaviour
  • Do not post illegal materials or post things encouraging actions such as pirating games

We have a four strike system in this community where you get warned the first time you break a rule, then given a week ban, then given a year ban, then a permanent ban. Certain actions may bypass this and go straight to permanent ban if severe enough and done with malicious intent

Wormhole

!roguelikedev@programming.dev

Credits

  • The icon is a modified version of the official godot engine logo (changing the colors to a gradient and black background)
  • The banner is from Godot Design

go to feed...