Hey, i'm trying to to make my mouse do a 360 movement within a game using mouse input only, is this possible?
What I have tried:
I am currently using these functions to control the mouse:
void cMouseInput::MouseSetup(INPUT* InputBuffer)
{
InputBuffer->type = INPUT_MOUSE;
InputBuffer->mi.dx = (0 * (0xFFFF / SCREEN_WIDTH));
InputBuffer->mi.dy = (0 * (0xFFFF / SCREEN_HEIGHT));
InputBuffer->mi.mouseData = 0;
InputBuffer->mi.dwFlags = MOUSEEVENTF_ABSOLUTE;
InputBuffer->mi.time = 0;
InputBuffer->mi.dwExtraInfo = 0;
}
void cMouseInput::MoveMouse(INPUT* InputBuffer, int X, int Y)
{
InputBuffer->mi.dx = (X * (0xFFFF / SCREEN_WIDTH));
InputBuffer->mi.dy = (Y * (0xFFFF / SCREEN_HEIGHT));
InputBuffer->mi.dwFlags = (MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE);
SendInput(1, InputBuffer, sizeof(INPUT));
}
And I am using them like this:
cMouseInput M;
M.MouseSetup(&M.InputBuffer);
M.MoveMouse(&M.InputBuffer, POS_X, POS_Y);
This is not working because,
1. Too fast, I would have to find a way to smooth this down a notch.
2. I can't get it to perform a full spin.
3. It only moves the cursor to a specific x-y coordinate on screen. Is there no way to just make the mouse do a simulated right movement..? Like MoveRight(200px); -> move mouse cursor 200 pixels to the right. (As an example)