1
\$\begingroup\$

Im searching for a way to lower my mouse movement cursor speed and not to let the user move it fast but i dont know how. i searched in internet but could not find something Usefull. thank you for helping.

\$\endgroup\$
  • \$\begingroup\$ Maybe when mouse movement occurs you could try and move the mouse in the opposite direction to the actual movement slightly. \$\endgroup\$ – Vadim Tatarnikov Feb 27 '16 at 8:56
2
\$\begingroup\$

Assuming you're getting mouse movement by Input.GetAxisRaw, you can simply multiply this by a sensitivity value, for example;

Sensitivity Vector;

Vector2 sensitivity = new Vector2(0.5f, 0.5f);

Calculating factorized mouse movement­

Vector2 mouseMovement = new Vector2(Input.GetAxisRaw("Mouse X") * sensitivity.x,
                                    Input.GetAxisRaw("Mouse Y") * sensitivity.y);

To do this you'll need to setup your Input Manager (Edit -> Project Settings -> Input) with the following two values;

enter image description here

Alternatively, if you want the value to be fixed, (and not changed in an options menu for example), you can manually change the Sensitivity value of the two mouse fields to your liking. Hope this helped you.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.