aevyrie / bevy_mod_picking

Picking and pointer events for Bevy.
https://crates.io/crates/bevy_mod_picking
Apache License 2.0
764 stars 170 forks source link

added filtering of 3d and 2d cameras to allow for 3d and 2d cameras to operate simultaneously #304

Closed skylerparr closed 6 months ago

skylerparr commented 7 months ago

When rendering with 2D and 3D cameras, the results would be very unpredictable. Adding the filter fixed the issue.

aevyrie commented 6 months ago

The raycasting backend should be reporting the camera.order, which the picking plugin uses to sort hits. Do you have a minimal repro of the "unpredictable picking" bug with 2d/3d cams?

aevyrie commented 6 months ago

It appears this is already fixed on main thanks to #293, which added OrthographicProjection to the sprite backend query. I've modified the existing sprite example with a 3d camera so we can test for this in the future.

skylerparr commented 6 months ago

Thank you. Sorry for the radio silence. I was dealing with a sick baby. I appreciate this library.