Object changes shape when camera moves | MouseLook script

The Mouselook script is attached to both the player (a rectangular prism in the upright position) and the camera. The “Axes” on the player is set to “MouseX” so that the player turn right and left but does not tilt. And the “Axes” on the camera is set to “MouseY” so it moves up and down. The problem is that when I move the camera, the pickaxe, which is a child of the camera, shifts and looks weird. This only happens when the camera moves up and down. From left to right, its fine. Take a look at the pictures.

Normal.


The pickaxe moves and shifts in shape a little. It squishes itself a bit. It needs to be like the picture above. I hope you guys can help.

Does it really change shape, though? I assume that this has more to do with the changing perspective of the camera.

2 Answers

2

Probably the problem is caused by the camera and/or the object having non-uniform scaling (not the same number for all 3 components of scale). This causes issues due to mathematics. Instead, scale the model of your objects.

Also, scale of the camera does not affect the view, so you should just leave it at (1, 1, 1).

could you show your script mouse look so everybody could identify the problem