I have a Virtual Mouse input set at “Hardware Cursor” mode. The idea is to be able to move it with the arrow keys.
Whenever I attempt to move them with the arrow keys the mouse snaps to the bottom left part of the screen (0,0), but I want it to snap to the middle.
I do this when first moving the mouse with the keyboard:
Vector2 virtualMousePosition = _virtualMouse.virtualMouse.position.value;
virtualMousePosition.x = Screen.width / 2f;
virtualMousePosition.y = Screen.height / 2f;
InputState.Change(_virtualMouse.virtualMouse.position, virtualMousePosition);
But it has a weird visual artifact in which you see the mouse on the bottom left for a single frame and then snaps to the middle correctly.
What should I do so that the mouse snaps to the center correctly. A much better alternative is for the mouse to not lose its original position (IE: No snapping at all).