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.
1 Answer
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;
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.