- Home /
How to set mouse sensitivity through script
Hey guys,
I was wondering, how can you set the mouse sensitivity through script...??
sort of the same concept as QualityLevel (http://unity3d.com/support/documentation/ScriptReference/QualityLevel.html)
Thanks
-Grady
Answer by DavidDebnar · Jul 17, 2011 at 08:20 AM
You wan't to controll the speed of mouse right? If so, you don't have to controll the speed of mouse, but instead of it, just higher up the other values... Make a global/static variable mouseSpeed, than in the settings, let the player change it, and then the camera, and everything will be affected by this. And if you wan't the actual mouse to move faster, than make a GUI object, that will follow the mouse, and just multiple it's speed by the sensitivity variable. And than for checking just use if the player presses the LMB and the mouse GUI object is above some button, make the action :).
David
no... Ill try to write some code, and Ill post it here
why you want the sensitivity for? just camera, or the whole thing?
I just want to be able to change the speed that the mouse moves in game.... i.e throught a pause menu.
Your answer
Follow this Question
Related Questions
Sniper Zoom Problem 1 Answer
Invisible mouse script? 1 Answer
Changing Mouse Sensitivity With HotKeys 2 Answers
setting the mouse position 2 Answers
Mouse position script... 0 Answers