Mouse Control on Wayland: Calculating Delta Without Centering
-
wrote 15 days ago last edited by
Hi, I'm having trouble implementing mouse-controlled camera movement in my game on Linux using the Wayland protocol.
Wayland prevents setting the cursor position within the game, but this is necessary when the player moves the mouse to the screen edge, making it impossible to continue calculating the movement delta.
To fix this, developers usually use the setPos function of QCursor to reset the mouse position to the screen center. However, this isn't possible on Wayland.
[06-23 12:35:41.836 42381 Warning] Setting cursor position is not possible on wayland
A temporary solution is to use the XCB plugin for X11, but X11 is very bad for games and FPS. Additionally, the XCB plugin freezes with vSync on Linux systems.
So, the question is: does anyone have solutions for calculating mouse movement delta without centering the cursor?
-
wrote 15 days ago last edited by
Probably exists way when i can handle low level signal for mouse - without cursor position, but with velocity vectors or directions vectors?
1/2