3 releases
Uses new Rust 2024
0.1.2 | May 8, 2025 |
---|---|
0.1.1 | May 8, 2025 |
0.1.0 | May 8, 2025 |
#971 in Game dev
323 downloads per month
Used in foxtrot
38KB
100 lines
Fix Cursor Unlock on Web
A tiny plugin that fixes Bevy not reporting when the cursor is unlocked on web
Usage
Just add the plugin, that's it:
use bevy::prelude::*;
use bevy_fix_cursor_unlock_web::prelude::*;
App::new()
.add_plugins(DefaultPlugins)
.add_plugins(FixPointerUnlockPlugin);
Now, Window::cursor_options::grab_mode
is automatically set to CursorGrabMode::None
for you when unlocking the cursor on web.
This fixes https://github.com/bevyengine/bevy/issues/8949
It will also automatically forward the keyboard event for pressing Escape
, which would be ignored otherwise.
Compatibility
bevy | bevy_fix_cursor_unlock_web |
---|---|
0.16 | 0.1 |
Dependencies
~19–31MB
~564K SLoC