|Topic was automatically imported from the old Question2Answer platform.
Hi, I’m trying to figure out Godot’s 3D navigation / navmesh system, but I’m having trouble. There’s very little documentation and I’ve only found one rough tutorial on YouTube. What I want to know most of all is, how is it meant to be used?
From what I’ve seen in that YouTube tutorial here: https://www.youtube.com/watch?v=_urHlep2P84&t=328s and read in the documentation here: Navigation — Godot Engine (3.1) documentation in English the Navigation node has NavigationMesh children which have MeshInstance children, and then when you select the NavigationMesh you get a Bake Navmesh button that bakes a Navmesh based on the geometry of the NavigationMesh childen.
Does this mean the Navigation node should be the root node of any scene with world geometry, and the world geometry all a child of a NavigationMesh?
But here’s the tricky bit, you can have more than one NavigationMesh child for a Navigation node, with different Navmeshes calculated for different mobiles to use. IE A player, a small enemy, and a big enemy. These navmeshes are created using the same geometry, then saved as a resource and plugged into the NavigationMesh nodes. So it’s possible to generate navmeshes and put them into the Navigation system without having it sit at the root of the tree.
So what I’m thinking is, what if you’re ‘supposed’ to have the Navigation node not as the root of the tree but as another same-level node, fed pregenerated Navmeshes? The trouble with this is, if the Navigation node and its NavigationMesh child aren’t containing the level geometry, you’d have to make another Navigation node and NavigationMesh node holding the level geometry just to bake the navmeshes each time you made a change, right? This seems inconvenient. The other alternative would be to double my level geometry just for baking navmeshes but that seems like a bad idea too.
So my problem is, I’m not sure how the Navigation node and system are meant to be used in Godot’s already existing structural system. There’s plenty of documentation on how Godot is meant to work, though of course you can change it… But there’s no info on how to use the Navigation node and system.
So how is the Navigation node and system meant to be used?