Hi, I'm currently working on a 2D platformer and I want to hit a wall and stop. I have a box collier characther controller, and rigid body active on the player. On the wall I have a box collider and a rigidbody. For some reason my character walks straight through the wall without stopping.
You probably don't need to have a rigidbody on those objects. Rigidbodies are meant for dynamic physics objects that react to forces in the environment. Unless your wall is destructible, you probably don't want a rigidbody on it. Also, you generally want to be using either a CharacterController or a Rigidbody, not both. A CharacterController, in a lot of ways, is a replacement for an accurate physics object to make controlling a character feel right.
You could have a character controller by Rigidbody, but that is harder to get to feel right, especially if you are doing a 3rd/1st person type of game with a humanoid character.
There is more complete documentation here: http://unity3d.com/support/documentation/Components/class-CharacterController.html.
answered Mar 22 '12 at 01:43 AM