Player Falling Through the Floor in Unity? 7 Causes and Fixes

Illustration: a character sinking through a cracked glowing floor grid

Your player spawns, drops, and keeps falling straight through the ground into the void. Or it walks fine for a while, then sinks through a slope, or a fast object passes through a wall. Falling through the floor in Unity almost always comes down to one of seven causes. This guide goes through each one with a quick test and a fix, for Rigidbody, CharacterController and 2D setups.

Quick Checks First

Press Play, pause the moment the player starts sinking, and select both the player and the floor. In the Scene view, look for the green collider outlines. You need to see:

  • A collider outline around the player.
  • A collider outline matching the floor’s surface.
  • The two outlines touching, not one starting below the other.

If an outline is missing or in the wrong place, you’ve found the cause. Turn on Gizmos in the Scene view toolbar if you see nothing at all.

1. The Floor Has No Collider

A mesh you can see is not something physics can touch. A Mesh Renderer draws it; only a collider makes it solid. Imported models, ProBuilder meshes with colliders removed, and planes you replaced the mesh on often have none.

Fix: select the floor and add a Box Collider for flat floors, or a Mesh Collider for complex shapes. For imported models, the Model tab of the import settings has a Generate Colliders option that adds Mesh Colliders on import.

2. Mixing 2D and 3D Physics

Unity runs two completely separate physics engines. 2D components (Rigidbody2D, BoxCollider2D, TilemapCollider2D) never collide with 3D ones (Rigidbody, BoxCollider, MeshCollider). A player with a Rigidbody2D will fall through a floor with a BoxCollider every time.

Fix: pick one. 2D games use only components ending in 2D. Check every object involved. The Tilemap guide shows how to give a tilemap a 2D collider.

3. Is Trigger Is Ticked

A collider with Is Trigger ticked reports overlaps but doesn’t block anything. If the floor or the player’s main collider is a trigger, the player passes straight through. This often happens when someone ticks it while testing OnTriggerEnter.

Fix: untick Is Trigger on the solid colliders. If you need both a solid body and a trigger zone, use two colliders: one solid, one trigger, often on a child object.

4. Moving With transform.position

Setting transform.position or calling transform.Translate teleports the object. Physics doesn’t sweep the path between the old and new positions, so it can end up inside or below the floor. The physics engine then tries to push it out, sometimes downwards.

Fix: move Rigidbodies through physics: set rb.linearVelocity, use AddForce, or for kinematic bodies use rb.MovePosition in FixedUpdate. Move CharacterControllers with controller.Move. The CharacterController vs Rigidbody guide explains which to pick.

5. Too Fast for the Physics Step

Physics runs at a fixed rate, 50 times per second by default. A falling object moving at 30 units per second covers 0.6 units per step. If the floor is a thin plane or a 0.1 unit box, the object can be above it on one step and below it on the next, never overlapping. This is called tunnelling.

Fixes:

  • Set the Rigidbody’s Collision Detection to Continuous (or Continuous Dynamic if the floor also moves). In 2D, set Rigidbody2D Collision Detection to Continuous.
  • Make floors thicker. A box collider 1 unit deep is far safer than a plane.
  • Cap fall speed in your movement code. Terminal velocity of 20 to 30 is plenty for most games.
  • Avoid huge gravity values. If your gravity is -80 to make jumps snappy, falls get very fast.

6. Layer Collision Settings

In Project Settings > Physics (and Physics 2D) the Layer Collision Matrix decides which layers collide. If the box between the Player and Ground layers is unticked, they pass through each other. Unity 6 also has per-collider Layer Overrides (Include Layers and Exclude Layers) that can silently exclude the ground.

Fix: tick Player x Ground in the matrix, and check the Layer Overrides section on both colliders. The collision layers guide explains the matrix in detail.

7. CharacterController and Spawn Problems

The CharacterController has its own quirks:

  • Center and height. If the capsule’s Center is too low, the bottom starts inside the floor and the controller falls through. Set Center Y to half the Height for a pivot at the feet.
  • Teleporting a CharacterController. Setting transform.position on a CharacterController is overwritten by its internal state. Disable the controller, set the position, then enable it again, or call Physics.SyncTransforms() after moving.
  • Spawning inside the floor. Any body that starts overlapping a collider gets pushed out, sometimes downwards. Spawn the player slightly above the ground.
  • No collider on the player. A Rigidbody with no collider falls through everything. A CharacterController is its own collider, so don’t add a second capsule collider to it.
  • Skin Width too small. Unity recommends Skin Width around 10 percent of the radius. Very small values make the controller get stuck or jitter into surfaces.

Terrain and Mesh Colliders

Terrain uses a Terrain Collider. If you replaced the Terrain Data or the collider shows a different shape from the terrain you see, assign the same Terrain Data asset to the Terrain Collider. Heights painted at very steep angles can also let fast objects slip through, so continuous detection helps here too. The terrain tutorial covers setup.

For Mesh Colliders, flipped normals make faces one-sided from the wrong direction, so objects pass through from above. Fix the normals in your modelling tool. Non-convex mesh colliders also can’t be on a moving Rigidbody. The Mesh Collider guide has the details.

📚 Learn the physics behind it

Understanding fixed timesteps and collision detection saves hours of trial and error. A few of our recommended game dev books cover game physics in plain language.

Troubleshooting

Player falls through the floor at the start of the scene

The player starts overlapping the floor, or its collider is offset. Raise the spawn point and check the CharacterController’s Center.

Objects fall through only when moving fast

Tunnelling. Set Collision Detection to Continuous and thicken the floor collider.

2D player falls through the tilemap

Add a TilemapCollider2D (and optionally a CompositeCollider2D) to the tilemap, and make sure the player has 2D components only.

Falls through after teleporting

For CharacterController, disable it before setting the position. For a Rigidbody, set rb.position and zero its velocity.

Sinks slowly into the floor

Something is setting position or velocity downward every frame, often a gravity script applied on top of Rigidbody gravity. Use one source of gravity.

FAQ

Do both objects need a Rigidbody?

No. For a player to land on a floor, the player needs a Rigidbody (or CharacterController) and both need colliders. Static floors shouldn’t have a Rigidbody.

Is Continuous collision detection expensive?

It costs a bit more than Discrete. Use it on the player and fast projectiles, not on every object.

Should I lower Fixed Timestep?

It reduces tunnelling but makes physics more expensive overall. Try Continuous detection and thicker colliders first.

Why does a plane work but a quad doesn’t?

A Quad comes with a Mesh Collider facing one way. A Plane faces up by default. Both are paper thin, so prefer a Box Collider for floors.

Can a Mesh Collider be too detailed?

Yes. Very dense meshes slow physics and can have tiny gaps. Use simple primitive colliders where you can.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *