-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Description
Bevy version
main#b13472d
Operating system & version
X11 on Arch Linux 5.13.7-arch1-1
What you did
window.set_cursor_lock_mode(true);What you expected to happen
The cursor should be locked in place, allowing cursor movement events to work as normal, but keeping the actual mouse cursor from moving or leaving the window. This is important for first-person and third-person camera movement.
What actually happened
The cursor is confined to the bounds of the window, but not locked in place. For example, when moving a first-person camera controller, you can only move the mouse as far as the window bounds go, preventing you from rotating 360 degrees with the mouse.
Additional information
This issue did not occur in Bevy 0.5, only in the main branch. It looks like winit was bumped from 0.24 to 0.25 since Bevy 0.5, but after downgrading winit manually in my fork, the issue still remained. It does not look like winit has changed this behavior on their end since 0.24, so it must be something in bevy, unless I missed something.
Cursor lock does seem to work correctly in fullscreen.