I came across a problem today. I was trying out the new Unity 5 First Person Character and noticed that you can look around using the mouse on the X and the Y axes but neither the controller nor the camera has a Mouse Look script attached. So when I tried to stop the character from being able to to look up or down at 90 degrees, to my surprise I can’t find the option. Usually I would have just set the clamp values in the mouse look script, but seeing as the new controllers do not have a Mouse Look component, how would I go about clamping the Mouse Look’s Y axes at say 65 degrees instead letting it look all the way up or all the way down at 90 degrees.
Hi,
You can clamp the Y axis in the FPSController.
Go in the Inspector of FPSController
In First Person Controller script You have a “Mouse Look” option. Expand it and check “Clamp Vertical Rotation” and set the angle with “Minimum X” and “Maximum X”.
This will clamp the Y axis at the angle given in Min/Max X… I know it is strange ^^