-
Member
How does Overwatch Mouse Sensitivity correlate to Moving the mouse with C++?
The code to move the mouse 1 pixel in the x direction is really simple. However, if your Overwatch mouse sensitivity is high, this seems to move more than one pixel. How does Overwatch Mouse Sensitivity correlate to Moving the mouse with SendInput by 1 pixel?
I imagine there is a function along the lines of:
Actual number of pixels moved = (number of Pixels moved by Send Input) * (Overwatch Mouse Sensitivity) * 0.1
int movedistancex = 1;
int movedistancey = 0;
INPUT input;
input.type = INPUT_MOUSE;
input.mi.mouseData = 0;
input.mi.time = 0;
input.mi.dwFlags = MOUSEEVENTF_MOVE;
input.mi.dx = movedistancex;
input.mi.dy = movedistancey;
SendInput(1, &input, sizeof(input));
-
Banned
Hey,
You can easily find your answer in another forum that I can't share here. pm me if you didn't find it.
Peace
-
Originally Posted by
seldane
SendInput(1, &input, sizeof(input));
Is there a reason you're not just using SetCursorPos?
-
Post Thanks / Like - 1 Thanks
seldane (1 members gave Thanks to Torpedoes for this useful post)
-
Member
I figured out the answer through numerous measurements.
const int sensitivity = 9; // Overwatch Mouse Sensitivity
const float pixelsmoved = 0.116* sensitivity; // this is the number of Overwatched pixels moved. 0.116 * sensitivity
You move one unit of Pixelsmoved for every 1 pixel that SendInput moves.
-
Post Thanks / Like - 1 Thanks
atmos (1 members gave Thanks to seldane for this useful post)
-
Member
Originally Posted by
Torpedoes
I could not get SetCursorPos to work, it would point the mouse in really weird positions even when I tried to move one pixel, like point me upward and spin me around. Are you using SetCursorPos with success?
Last edited by seldane; 07-09-2016 at 02:25 PM.