Hi there,
I’ve got a script which allows for walking in scene using arrow keys. I also added rigidbodies and colliders to walls and camera in scene. The problem is that if the user is facing the wall and trying to go ahead at the same time the camera starts to bounce and it really doesn’t look nice. I tried to make a new physic material (Dyn Frict = 0, Stat Frict = 0, Bouncyness = , Min,Min) and it got better but it’s still not what i’m after. All I want is that if collision is detected camera goes to standstill. Tried to find answer on forum and didn’t suceed hope I doesn’t duplicate any topics.
I’m unsure why the character would be bouncing when you are touching the wall (is it possible that the character is become trapped between a floor and ceiling and bouncing off both of those?) but if you want to freeze your camera you should look at the OnCollisionEnter function which you can use to stop movement when it starts to collide.
u shouldn’t put a rigidbody on the cam. u may however put a kinematic rigidbody if u want to detect collision with colliders with no rigid bodies attached. then handle your camera collision by moving it around the way u want through script.
if u insist on using a non kinematic rigidbody on the cam for some reason, try checking freeze rotation on the rigidbody on the cam.