bevy_panorbit_camera icon indicating copy to clipboard operation
bevy_panorbit_camera copied to clipboard

Mouse Inputs Passthrough from `egui` to `bevy_panorbit_camera`

Open SK83RJOSH opened this issue 9 months ago • 22 comments

When not directly scrolling / dragging / clicking egui ui elements, all inputs get passed through to bevy_panorbit_camera when using the following code to add ui systems:

add_systems(Update, (draw_title_bar, draw_file_tree).chain())

As demonstrated here:

https://github.com/Plonq/bevy_panorbit_camera/assets/1371787/cf471495-b9d0-4da2-9d53-e7a148f7520e

This appears to be a scheduling issue, and doing the following somewhat resolves the issue and blocks scroll events, but not mouse drag events:

add_systems(PreUpdate, (draw_title_bar, draw_file_tree).chain().after(EguiSet::BeginFrame))

As demonstrated here:

https://github.com/Plonq/bevy_panorbit_camera/assets/1371787/ddb11fee-1224-4b8d-9061-3ac5916e4fc8

Using the solution mentioned in #39 yields no further improvements.

Here is the code used for both of the above: repro.zip

SK83RJOSH avatar May 10 '24 15:05 SK83RJOSH