- Home /
MouseLook - Min & Max Problem
Hello,
I have a first person controller in the scene, and I'm struggling to have a restriction in which direction to look in. I've added restriction to the Y axis so I can only loop up 40, and down -40. But on the X - the camera keeps spinning all the away round no matter what Minimum or Maximum restriction I put on it ... Am I doing something wrong?
I've also deactivated the Character Motor (I don't want the character to move - only the head ... and a head can't turn 360 by its self -- this is what I'm trying to fix)
Any help would be much appreciated.
Thanks
All I'm using is the $$anonymous$$ouse Look Script that comes with Unity. In the inspecter it has a $$anonymous$$in X, $$anonymous$$ax X - $$anonymous$$in Y, $$anonymous$$ax Y ... The X has has no effect
Answer by Eric5h5 · Feb 06, 2011 at 11:23 PM
The MouseLook script is on two different objects. This is because X rotation rotates the whole thing, Y rotation only makes the camera look up and down.
So how would i go about restricting the rotation on X. I tried adjusting the $$anonymous$$in and $$anonymous$$ax on the object with X and still nothing
Wow, the current $$anonymous$$ouseLook script is bugged. Use this one ins$$anonymous$$d: http://www.starscenesoftware.com/stuff/unity/$$anonymous$$ouseLook.txt
Thanks. It's kind of unreal that the $$anonymous$$ouseLook script still has this bug 4 years later, but I ran into the same issue.
Answer by Nebuch · Jun 25, 2015 at 12:58 PM
I have debug the script; http://answers.unity3d.com/answers/993563/view.html