How to lower incriments on mouselook

Hi, everyone. I was wondering if there was a way to lower the move increments on the mouse look script. I would do it myself, but i only read js, not c#.

I'm working on an FPS and thought that the simplest way to make a sniper zoom would be to lower the feild of veiw(I thought of bringing it closer, but then the player wouldn't be able to see the enemeis that were very close to them). However, in the zoomed feild, it moves over about ten meters. I don't know what to do, because I thought that that was how avert fate did it, and I really like the way the player works in that game.

Thanks in Advance,

-Joe

(Note: for small edits like these, C# and Javascript just aren't that different. Don't be scared to read and make small changes to an existing C# script.)

MouseLook has two public member variables: sensitivityX, sensitivityY. By default they are set to 15.0. Changing those values should effect your mouse sensitivity. I believe making them lower is what you want while zoomed.

Now all you have to do is use new values while zoomed, and the original values while not zoomed. If you add that logic to the standard MouseLook script, you should probably save that as a new script rather than overwrite the standard one.

But you don't even have to edit the MouseLook script if you don't want. The sensitivity variables are public. So in your script that turns the zoom on and off, you could also set the MouseLook.sensitivityX and MouseLook.sensitivityY variables to new values. (Bonus: you get to stick with Javascript.)