|
I am using Mouse Look for a 3d title but it seems to be able to rotate 360 degrees instead of any limit i put on it. The camera is at 40 degrees, and I wan't 10 degrees of movement possible to each side. Putting the minumum at 30 and maximum at 50 doesn't work. Any help?
(comments are locked)
|
|
Use this script for clamping the angle. Works with any input values. It's not mine, I think I got it at UnifyCommunity. I also had problems when setting limits to MouseLook, but using this function for clamping the angle worked perfect. What do I change to change the maximum and minimum angles?
May 22 '11 at 02:09 AM
Max 4
Call this function from your script for clamping the angles, for instance: camera.transform.rotation.y = ClampAngle(myAngle, 30, 50) would allow the angle to have 10 degrees of movement around 40.
May 23 '11 at 09:52 AM
Edy
I still don't get this. In the code you provided, how do I change the maximum and minimum angles?
May 23 '11 at 11:18 AM
Max 4
(comments are locked)
|
