Godot 4: Why does the player fall through an imported GLB floor?
Start with the scene that is actually running. A visible floor mesh and a registered physics shape are separate objects.
Three checks in the running scene
- Enable Debug → Visible Collision Shapes, run the scene, and locate the terrain in the Remote scene tree. Confirm that the visible floor has a corresponding
StaticBody3Dand that its shape covers the walking surface. - Make the
CollisionShape3Da direct child of the body and assign a shape resource. For static terrain with irregular geometry, inspect the generated trimesh. - Compare the terrain body’s collision layer with the
CharacterBody3Dmask. If the ground uses layer 1, enable layer 1 in the player’s mask. Check those values at runtime if a script sets them.
TerrainRoot (Node3D) ├─ ImportedTerrain (MeshInstance3D) └─ Ground (StaticBody3D, layer 1) └─ FloorShape (CollisionShape3D) Player (CharacterBody3D, mask includes layer 1)
Reference for shape placement and static trimeshes: Godot’s 3D collision shapes guide.
Try all three setups in Godot
The same imported floor sits under three capsule players. The first two fall: one has no floor collider, the other excludes the floor layer. The third lands.
Unzip the sample, import project.godot in Godot 4 and press F5. Press R to repeat. Tested on Godot 4.7.2.
What happened in our four-sector test
On Godot 4.7.2, we imported a GLB with four adjoining flat sectors. A capsule player using move_and_slide() fell below Y = −4 in each of three cases: no collider, a mask that excluded the ground layer, and a shape nested below an intermediate node.
With a direct shape on each static body and a matching mask, the player landed and crossed all three joins without losing floor contact. The same run passed in a Windows debug export.
These results cover flat test terrain. Real scenes can also depend on spawn height, node transforms and the movement script.
Get help with a reproducible collision bug
For a paid diagnosis or a scoped fix, start with your Godot version, the expected behaviour and a screenshot of the running scene tree or collision settings. A redacted movement snippet is useful. We agree on scope and price before starting.
Ask about a collision fix