mrDIMAS / rusty-shooter

[suspended] 3d shooter written in Rust using rg3d
MIT License
281 stars 25 forks source link

Grab the mouse #2

Closed Eragonfr closed 4 years ago

Eragonfr commented 4 years ago

I'm on Linux, with i3 on X11 or sway on wayland and i have a problem. The mouse cursor is shown and the game does not grab it. So i'm not able to turn the player head because the mouse quit the window. Is rg3d allowing that ? Grabbing the mouse, hide the cursor, and move it to keep it at center of the window ?

mrDIMAS commented 4 years ago

Sure, it can be done by using set_cursor_pos and set_cursor on window. I'll fix it in next commit.