Mathf.Clamp()
, но ничего не работаетvoid LateUpdate()
{
mouseX = Input.GetAxis("Mouse X") * sentivity * Time.deltaTime;
mouseY = Input.GetAxis("Mouse Y") * sentivity * Time.deltaTime;
Player.Rotate(mouseX * new Vector3(0, 1, 0));
transform.Rotate(-mouseY * new Vector3(1, 0, 0));
mouseY = Mathf.Clamp(mouseY, -90, 90);
}