Quick answer: Add a StaticBody3D + CollisionShape3D under each MeshInstance3D in the source scene, then re-export via Scene → Export As → MeshLibrary.
A dungeon prototype uses GridMap to lay out walls and floors. Player walks straight through every wall. MeshLibrary built fine, meshes render, but no collision — collision wasn’t baked.
Source Scene Layout
Each cell in the library comes from a top-level node in the source scene. For collision to bake, that node needs the right structure:
WallTile (Node3D)
- MeshInstance3D
- StaticBody3D
- CollisionShape3D
The MeshLibrary exporter walks each top-level node looking for these children.
Quick Way: Auto-Generate Collision
For each mesh:
- Click the MeshInstance3D in the source scene.
- Top toolbar: Mesh → Create Single Convex Collision Sibling.
- For walls/floors: Trimesh Static Body for accurate shape.
Godot creates the matching StaticBody3D and CollisionShape3D automatically.
Re-export
Open the source scene. Scene → Export As → MeshLibrary. Pick the existing .meshlib path; overwrite. GridMap auto-refreshes the next time you open it.
Common Pitfalls
- Wrong physics body type: only StaticBody3D bakes; CharacterBody3D, RigidBody3D etc. are ignored.
- Disabled CollisionShape:
disabled = truestill exports as disabled. Verify enabled before export. - Bad transforms: rotated/scaled nodes can bake collision in a different pose than the mesh visually shows.
Verifying
Run scene. Walk toward a wall — player stops. Open Editor Debugger → Visible Collision Shapes; shapes should match wall meshes 1:1.
“MeshLibrary is a flat archive. What you put in the source scene is what bakes. Add StaticBody3D children for every collidable.”
For NavigationRegion3D tiles, the same scheme applies but with NavigationMesh + Navigation Region children. Bake nav and physics together for grid-based dungeons.