CharacterController

How to use a CharacterController to make sure the Player can't walk through walls!

A CharacterController is a Component that allows you to move a GameObject while allowing it to collide with the environment.

By using the CharacterController’s Move() function, you can move a GameObject while making sure it does not fall through the floor or move through walls.

Notes

  • A CharacterController looks like a Collider, but doesn’t function in exactly the same way. Do not treat it like a regular collider.