Description
openedon Sep 14, 2022
Bevy version
All versions
What you did
Read bevy mouse events and determine the order of the incoming events
What went wrong
Because input streams are split up, it's impossible to order these events correctly. This is especially important if there is a long pause in rendering for some reason, and you still want to ensure behavior is consistent. If there are multiple mouse moves and button presses, it's important to know which came first.
If a mouse move precedes a mouse up, then dragging occurred followed by a drop. If the mouse move happens after the mouse up, then a drop occurred before the move. If a mouse up happened between two mouse move events in bevy, it's impossible to know where the mouse actually was at the time of the drop.
This is solved in other places by merging all events into a single event stream, disambiguating event order.winit
does this as well, but bevy splits these events up before passing them into the bevy event system.
Maybe it would be helpful to pass in the raw winit window event stream?