yaw += camSpeed * Input.GetAxis(“Mouse X”);
pitch -= camSpeed * Input.GetAxis(“Mouse Y”);
Vector3 direction = new Vector3(Mathf.Clamp(pitch, -90, 90), yaw, 0.0f); Camera.main.transform.rotation = Quaternion.Euler(direction);
My code for rotating the camera is the above. However, when I try using this code, it works… mostly. When I go to one of the limits for long enough, it gets stuck there unless I apply a lot of force moving it back. How would I fix this?