Generally never read / write to / from eulerAngles.
The reason is gimbal lock.
Instead track your own float variable that is the heading, adjust and clamp that variable, then “drive” the camera’s rotation each frame.
Generally never read / write to / from eulerAngles.
The reason is gimbal lock.
Instead track your own float variable that is the heading, adjust and clamp that variable, then “drive” the camera’s rotation each frame.