hi i am trying to make my cam rotate around the x with the mouse but my problem is that i can rotate 360
and i want to set limit on rotationthnx in advance
the code
mousey += Input.GetAxis("Mouse X");
mousex -= Input.GetAxis("Mouse Y");
player.transform.eulerAngles = new Vector3(0, mousey, 0);
Cursor.lockState = CursorLockMode.Locked;
if (camm.transform.rotation.x <= 35 && camm.transform.rotation.x >= -90)
{
camm.transform.rotation = transform.rotation * Quaternion.Euler(mousex, 0, 0);
}