Open pyweeker opened 2 years ago
I've done this with rapier colliders: https://docs.rs/bevy_rapier2d/latest/bevy_rapier2d/prelude/struct.QueryPipeline.html#method.intersections_with_point
I also filed https://github.com/aevyrie/bevy_mod_picking/issues/130 to get Lyon support.
This has been added to bevy_mod_raycast: https://github.com/aevyrie/bevy_mod_raycast/pull/38 Currently downstreaming into bevy_mod_picking.
I just created a very simple plugin for this.
https://github.com/xavierwoo/bevy_cursor_hovering_sprite
Hope it meet your need.
Hello, is it possible to have something equivalent than bevy_mod_picking https://github.com/aevyrie/bevy_mod_picking
which works for 3d , but here for 2d ? i tried to get inspiration from buttons , but it is not clean to put this kind of component everywhere. I dont know how to writte this kind of method. I'd like to hover sprites , click on it to select it , or click and drag to draw a rectangle which select a vector or entities. So i need to get entity / entities when the mouse hovers sprite(s). very usefull++