#camera rotate twice
1 messages · Page 1 of 1 (latest)
change your camera rotation line (2nd to last line) to this:
cam.transform.localRotation = Quaternion.Euler(x_rotation, 0, 0);```
since the camera is a child of the player it's going to inherit the rotation of the player, and have its own local rotation on top of it. You can just have the camera rotate on the x locally and rely on the player body's rotation for the y axis rotation