# Why can't a user controlled object collide with another object?

Ok this is really bugging me. I have read through the unity manual regarding Rigid Bodies and colliders and general physics. I am having one serious problem and it is holding me back from going forward in my game development.

Say for example I have a character or an object that I want to control. I would control this object with keyboard and mouse to move its position in the world. Naturally as it is moving around I don’t want it to fall through the floor and I want it to be stopped by walls and other obstacles. I am not able to get the object to stop when it hits a wall.

I have tried many combinations. A single collider, a collider a kinematic rigid body, and a collider with a physics controlled rigid body.

When I use just a collider or a collider with a Kinematic rigid body it just goes through the walls. If I make it a regular rigid body then it will hit the wall but then I have to worry about falling through floors, and when I do hit the wall physics effects result such as being knocked back etc. Freezing constraints don’t seem practical either.

I am just not getting the problem and I know it is something basic because what I am asking is common for most games. Is it something to do with the fact that the object is under user control?

So frustrated. My understanding from reading the manual is that I would just need a collider on both or that and a kinematic rigid body.

Can someone please help me out here? I’ve been trying to figure this out for days. Thank you.

If you want to use a Rigidbody, you have to make sure that:

1. it is NOT set to IsKinematic
2. the gameObject it is attached to has a collider that is NOT set to IsTrigger = true
3. make sure the layer of the rigidbody’s gameObject can actually collide with the layer of the wall/floor object (Physics Preferences)
4. The wall/floor object has a collider as well, also NOT set to IsTrigger
5. At least One of the two colliders have to be set to Convex = true (most likely the one with the rigidbody)
6. Important: Don’t move the rigidibody’s gameObject by using Vector3.Lerp or similar! You move rigidbody objects with Transform.Translate, setting the rigidbody’s velocity directy, or using AddForce.

Furthermore, you can always look into using a CharacterController with CharacterMotor; It simulates physics and it comes with the Standard Package.