#Detect click on sprite
1 messages · Page 1 of 1 (latest)
You would probably have to write the logic to make something non UI clickable. Check https://bevy-cheatbook.github.io/cookbook/cursor2world.html, it might help you figure it out!
This works in simple square shape, but might be tricky for complex sprite shapes. Also found out about https://github.com/aevyrie/bevy_mod_picking/issues/7 so it looks like there are no simple way to do it for now?
You may use some physics libraries, like https://rapier.rs/docs/user_guides/bevy_plugin/scene_queries/
Scene queries are geometric queries that take all the colliders of the physics world into account. These queries are
I'd approximate the sprite shape as much as possible with a basic shape then. I guess I lack some more context but do you really need that extra complexity?
Haven't look into this yet as my game (city builder) generally does not need physic engine, but I'll try. Thanks!