Quick answer: Each MeshLibrary item must include a NavigationMesh. GridMap exposes a navigation layer; placed cells contribute their nav mesh automatically once baked into the library.
A dungeon built with GridMap has working collision but NPCs can’t pathfind — the cells contribute no navigation geometry.
Bake Nav Into the MeshLibrary
In the source scene for the MeshLibrary, each cell node needs a NavigationRegion3D (or a NavigationMesh under it) in addition to its MeshInstance3D and StaticBody3D:
FloorTile (Node3D)
- MeshInstance3D
- StaticBody3D / CollisionShape3D
- NavigationRegion3D (with a baked NavigationMesh)
Re-export the MeshLibrary (Scene → Export As → MeshLibrary). The nav data is now part of each item.
GridMap Navigation Layer
Select the GridMap. Its inspector has navigation settings — ensure the cells’ nav meshes are assigned to a navigation layer your agents use. GridMap stitches the per-cell nav meshes together on the navigation map.
Quick Collision + Nav Generation
In the source scene, select a MeshInstance3D → Mesh menu → Create Trimesh Static Body, and add a NavigationRegion3D + bake. Repeat per tile type, then export.
Rebake After Edits
Placing/removing GridMap cells updates navigation automatically if the items carry nav meshes. If you change the source scene, you must re-export the MeshLibrary — the GridMap won’t pick up changes otherwise.
Verifying
Place floor cells; a NavigationAgent3D paths across them. Remove a cell; the path routes around the gap. Debug nav mesh visualization shows geometry under placed cells.
“GridMap nav comes from the MeshLibrary items. Bake nav meshes into the source scene, re-export.”
Author one ‘nav template’ tile, get its NavigationRegion3D right, then duplicate it as the base for every walkable tile type.