Player goes through the floor - collision isn't working?

I have no idea why this isn’t working after following some tutorials online.

I have a simple player that can fly around in 3d space, and then I have a floor (big cube). I don’t want the player to be able to go through the floor. I put a collision detecter on the player as well as the floor. No idea what’s wrong with the setup.

I’ve attached a picture of my player (a sphere) and my floor (a cube).


The set-up looks ok to me. The floor doesn’t need a rigidbody if it doesn’t move, though. Simply mark it as static instead. What you have should work, though.

Your player control script is probably translating your player in a way that circumvents collision detection. How are you moving the player?