Hide mouse cursor #3292
-
I would like to hide the mouse cursor, but I can't find anything about it. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Here's the relevant docs, and an example https://docs.rs/bevy/0.5.0/bevy/window/struct.Window.html#method.set_cursor_visibility |
Beta Was this translation helpful? Give feedback.
-
You can call fn hide_cursor(mut windows: ResMut<Windows>) {
let window = windows.get_primary_mut().unwrap();
// window.set_cursor_lock_mode(true);
window.set_cursor_visibility(false);
} |
Beta Was this translation helpful? Give feedback.
-
Thank you! |
Beta Was this translation helpful? Give feedback.
-
In bevy 0.11 you have to set a property on the windows "cursor" object:
|
Beta Was this translation helpful? Give feedback.
Here's the relevant docs, and an example
https://docs.rs/bevy/0.5.0/bevy/window/struct.Window.html#method.set_cursor_visibility
https://bevy-cheatbook.github.io/cookbook/mouse-grab.html