Navigation mesh upside down

Godot Version

4.4 dev2

Question

how to make nav mesh work upside down?

as for a planet

all I can make work is upper surface but not the bottom surface thanks

In general that does not work, at least not with a lot of additional custom systems and code all around.

Major parts of the navigation mesh and pathfinding system requires a common “up” vector to work as things are basically handled two-dimensional. A lot of calculations in navigation mesh systems are done under this assumption for keeping complexity manageable and things performant.

In Godot you would need to use multiple navigation maps for all the major axis that you connect together with your own game logic to cover things like “wall or ceiling navmesh”. In case of the navigation system the navmesh baking only bakes with Vector3.UP. In case of navmesh placement this is restricted to the navigation map up vector that is also by default Vector3.UP but this can be changed with the NavigationServer.

Even with a changed navigation map up vector you can not have navigation mesh polygon faces rotated upside down from this up vector, everything at or over 90° breaks the navmesh and pathfinding logic. As mentioned you would need to use multiple navigation maps for all the major axis that you somehow logically connect together with your own game logic, e.g. with a waypoint system on top that switches agent path queries when jumping between floor /wall / ceiling.

Games with spherical worlds in general either dont use navmesh at all or use flat navmesh behind the scene where they remap the sphere positions to the flat positions on the map back and forth. Same for worlds that “wrap around” where the actual pathfinding navmesh is never wrapped. Most spherical worlds are just an illusion where the entire game logic runs on a flat plane behind the scene.

2 Likes

If I make spheres verticies as an waypoint.
Could that work?

Would I have to connect them?
Or would system connect it self?

I think you would have a simpler time by using AStar3D waypoints for the general pathfinding compared to using navmesh as waypoints are indifferent towards any axis or surfaces.

Depending on your world you could then make your agents first query the AStar3D for a general path around your world and then query a more local navigation map around them for detail. That is how most larger “open world” games do it as they only ever load and create navmesh around the player but not for the entire world.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.