- Home /
First person camera restriction.
Well, this is kinda hard to explain but I will try my best. I want the first person camera to have restriced movement, by which I mean the camera can only look 90 degrees left and right and 90 up and down. The camera is static so it can't "walk". An example of what I'm on about, could be like call of duty when your in a veichle, you can only look in a certain area. I've looked at the code of the default script and changed a few values but can't seem to do anything.
Any help at all would be awesome
Answer by efge · Mar 03, 2011 at 07:02 PM
Take a look at the script MouseOrbit.js in the "Standard Assets/Scripts/Camera Scripts" folder. There is an advanced example for clamping camera pitch (which you can use as a starting point).
Thanks for guiding me their. I just made $$anonymous$$or changes to that script and applied it to a camera, and now it works brilliantly.
You have been a massive help
Your answer
Follow this Question
Related Questions
Clamp Camera with Transform objects along the x axis 0 Answers
First Person Controller wont look up or down 0 Answers
Unity 2017.0.3 Mouse Look Script With Clamp!! 0 Answers
First Person Controller not working 1 Answer
Player walks to the right? 1 Answer