-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MouseMotion not working in browser as intended #11232
Comments
I suspect this is related to #11052: smells like a winit / winit integration bug. |
This looks like a bug in Winit. Strangely enough I can only reproduce this in Bevy, Winit examples work fine. |
Should be fixed in rust-windowing/winit#3369 and will be backported to v0.29.10. |
@daxpedda how do I take advantage of this for my bevy app? |
You have to wait until v0.29.10 gets released or port rust-windowing/winit#3369 yourself. |
Going to close as fixed (since it appears to be on main). If it still doesn't work there, or after the next release, please reopen this! |
@alice-i-cecile I'm pointed to main and still have the same issue after using this commit 64a15f1 I still need to switch tabs or change change screen size in order to capture the mouse motion events for desktop/wasm. |
it's waiting on a patch release of winit that didn't happen yet |
@mockersf is it this one? |
This one |
@mockersf you rock. Note if I point to main for winit it will break bevy_winit right now.. but doing the specific commit mockersf referenced seems to solve this issue. if anyone else wants a temporary work around, I believe it's safe to add this to your cargo toml. Only tested against bevy main though, not 0.12.1. [patch.crates-io]
winit = { git = "https://github.com/rust-windowing/winit.git", rev = "798c205cef1aa0c92eb43bef537583ce5b1ad1fb" } To let you know of breaking changes on main right now, as I believe they'll need to be fixed for next winit patch, hope this helps:
|
Winit v0.29.10 is out now. |
works without patching in winit verison now. |
Bevy version
main branch as of: #11231
Desktop / chrome / Wasm
What you did
Have a minimum viable system:
This system doesn't register mouse motion until the screen has been "messed" with. Such that the screen is resized or you switch in and out of the screen after the bevy app loads.
You can see my whole code base here:
https://github.com/miketwenty1/bevy_broken
What went wrong
Here is a demo showing that I click in the button in the canvas and it still doesn't register mouse motion events.
the
info!()
's only appear in the console after I resize the screen. After that I can click in the screen and then it registers the mouse motion events.https://github.com/bevyengine/bevy/assets/7761473/cdb1f6a4-6630-4a67-b161-a77e58313d38
The text was updated successfully, but these errors were encountered: