johanhelsing / bevy_pancam

A bevy plugin for panning orthographic cameras
Apache License 2.0
173 stars 26 forks source link

Camera moves when clicking on a egui window #37

Closed carrascomj closed 1 year ago

carrascomj commented 1 year ago

Whenever I click on the egui window, there is a translation of the camera. This did not happen with bevy 0.9.1.

Steps to reproduce

  1. Run
git clone https://github.com/johanhelsing/bevy_pancam.git
cd bevy_pancam
cargo run --example egui --features bevy_egui
  1. Pan a bit over the map and click on the window to move it around. You should notice a translation in the camera (as if suddenly panning).

Log

(running on iGPU)

2023-05-02T20:36:48.842895Z  INFO bevy_winit::system: Creating new window "Bevy App" (0v0)
2023-05-02T20:36:48.843434Z  INFO winit::platform_impl::platform::x11::window: Guessed window scale factor: 1.6666666666666667    
2023-05-02T20:36:48.892126Z  INFO bevy_render::renderer: AdapterInfo { name: "Intel(R) UHD Graphics (CML GT2)", device_type: IntegratedGpu, driver: "Intel open-source Mesa driver", driver_info: "Mesa 23.0.2", backend: Vulkan }
2023-05-02T20:36:48.989418Z  INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "Linux rolling ArcoLinux", kernel: "6.2.12-arch1-1", cpu: "Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz", core_count: "4", memory: "15.4 GiB" }
jkuball commented 1 year ago

I stumbled upon this issue and I think I have more intel: This might not have anything to do with egui!

It also happens when you unfocus the game window and then click back into it, regardless of whether you have the bevy_egui feature enabled or not.

Volkor3-16 commented 1 year ago

Just ran into the same issue and thought I'd add my input.

It also happens when you unfocus the game window and then click back into it, regardless of whether you have the bevy_egui feature enabled or not.

I'm unable to replicate the panning on re-focusing the window - Although that might be KDE's focusing on hover - I'll update this if/when I test on other platforms.

johanhelsing commented 1 year ago

Can reproduce the bug (the original one, not the window focus one), but don't have time to look into it now.

carrascomj commented 1 year ago

I think we can close this, as it was fixed (for me) by https://github.com/johanhelsing/bevy_pancam/pull/44.