-
-
Notifications
You must be signed in to change notification settings - Fork 175
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
Mouse event stuck on MouseJustReleased #66
Comments
looks like the issue is in interactable.rs. |
dirty fix (seems to work fine)
|
on a side note would it be possible to send events only when the state changes? |
Thanks for the example and fix, I'll take a closer look soon.
That is how it should behave in practice, are you seeing extra events somewhere? |
As a follow up to the "only send events when the state changes", you can use this to only run on a state change. bevy_mod_picking/examples/events.rs Lines 63 to 66 in a554350
PR #79 should address this issue in |
Thanks, it works fine :-)
Regarding events, i was thinking of an event queue so we dont need to check
every entity, but I guess it's not very ECS style.
…On Thu, Dec 17, 2020 at 7:02 AM Aevyrie ***@***.***> wrote:
As a follow up to the "only send events when the state changes", you can
use this to only run on a state change.
https://github.com/aevyrie/bevy_mod_picking/blob/a554350d771e2c71078993ac4b3d6ad3accb180c/examples/events.rs#L63-L66
PR #79 <#79> should
address this issue in interactable.rs I used a slightly condensed version
of the solution you provided. Thanks!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#66 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACF5UVTOZNNZTPRTQZADHTLSVGNGJANCNFSM4UAWYT7A>
.
|
I'm right there with you, I'm not sure what the "best" way to do this is. I was just thinking the other day that it might make more sense to use the Bevy event system. ¯\_(ツ)_/¯ |
Hello,
I noticed an issue that happens quite frequently in my app when an Interactable entity keeps receiving the MouseJustReleased event even when the mouse is at rest.
Sorry i dont have an easy repro... Though I managed to repro it in the events example, by adding more "planes" next to another, and clicking frantically on a plane then another then back etc..
Eventually you'll see the MouseJustReleased start pouring non stop, even if you take your hand off the mouse.
This seems to happen when you click on a plane then move the mouse out of the plane quickly, because it stops pourring events when you bring the cursor back on top of the stuck plane (if that makes sense)
I hope that's enought information, i'll try to find time to investigate this, might be an issue in the event system or in bevy's mouse input.
Here is the code i use to repro, in example/event.rs just replace the plane spawning by:
Then quickly click on 1 plane, then another, then another... etc
Hope that helps!
The text was updated successfully, but these errors were encountered: