Sending window events via the ECS doesn't update the corresponding fields on the Window
.
#6163
Labels
A-Windowing
Platform-agnostic interface layer to run your app in
C-Bug
An unexpected or incorrect behavior
C-Testing
A change that impacts how we test Bevy or how users test their apps
Bevy version
0.8.1
What you did
Sent a
CursorMoved
event, or another event frombevy_window
.What went wrong
The corresponding fields on the appropriate
Window
were not updated.Additional information
This was discovered while attempting to get input playback working properly: Leafwing-Studios/leafwing_input_playback#10
Users can workaround this by manually setting the appropriate fields: https://docs.rs/bevy/latest/bevy/window/struct.Window.html#method.set_cursor_position. While it would be nice to have #4530 to make this pattern easier, simply adding a set of systems that runs at the start of each frame, reads these events and then sets the corresponding window fields would probably be enough to fix this surprising behavior.
The text was updated successfully, but these errors were encountered: