I’m using this as a mouselook script, works perfectly except for if the mouse is put to the bottom or top of the screen - it can loop all the way around.
var sensibility : float;
function Start () {
}
function Update () {
transform.Rotate(Vector3(0,Input.GetAxis("Mouse X")*sensibility,0), Space.World);
transform.Rotate(Vector3(-Input.GetAxis("Mouse Y")*sensibility,0,0));
}
How would I set a limit to ~-80 and 90 degrees?