Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Prohect authored Jan 6, 2025
1 parent 00c0fcb commit f4536e1
Showing 1 changed file with 26 additions and 23 deletions.
49 changes: 26 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@
Tweak Mouse Sensitivity
Why?
As the DPI of mice continues to increase, the original mouse sensitivity settings do not perform well at high DPIs, such as 20000. This modification does one simple thing: it multiplies the original mouse sensitivity by itself during processing.
# Tweak Mouse Sensitivity

Code
Original code:
## Why?

java
Double value = that.client.options.getMouseSensitivity().getValue();
double d = value * 0.6F + 0.2F;
double e = d * d * d;
double f = e * 8.0;
i = that.cursorDeltaX * f;
j = that.cursorDeltaY * f;
Modified code:
the dpi provided by the mouse is going higher and higher, the origin mouse sensitivity procedure is not working cool when u set dpi like 20000.
this mod only do one simple thing: multiply the origin mouse sensitivity by itself when processing
like this:
origin: Double value = that.client.options.getMouseSensitivity().getValue();
double d = value * 0.6F + 0.2F;
double e = d * d * d;
double f = e * 8.0;
i = that.cursorDeltaX * f;
j = that.cursorDeltaY * f;
......

java
Double value = that.client.options.getMouseSensitivity().getValue();
double d = value * 0.6F + 0.2F;
double e = d * d * d * value; // Multiply e by mouse sensitivity
double f = e * 8.0;
i = that.cursorDeltaX * f;
j = that.cursorDeltaY * f;
The variables i and j will be added to your look direction. Variable f is used for non-spyglass view, and variable e is used for spyglass view.
now: Double value = that.client.options.getMouseSensitivity().getValue();
double d = value * 0.6F + 0.2F;
double e = d * d * d * value;//times e by mouseSensitivity
double f = e * 8.0;
i = that.cursorDeltaX * f;
j = that.cursorDeltaY * f;
......

i,j would be finnaly add to your look direction.
f is there for non spyglass view to use, e for spyglass


License
This template is available under the CC0 license. Feel free to learn from it and incorporate it into your own projects.
## License

This template is available under the CC0 license. Feel free to learn from it and incorporate it in your own projects.

0 comments on commit f4536e1

Please sign in to comment.