bevy/examples/picking
notmd f7b2a02224
Make sprite picking opt-in (#17842)
# Objective

Fix https://github.com/bevyengine/bevy/issues/17108
See
https://github.com/bevyengine/bevy/issues/17108#issuecomment-2653020889

## Solution

- Make the query match `&Pickable` instead `Option<&Pickable>`

## Testing

- Run the `sprite_picking` example and everything still work


## Migration Guide

- Sprite picking are now opt-in, make sure you insert `Pickable`
component when using sprite picking.
```diff
-commands.spawn(Sprite { .. } );
+commands.spawn((Sprite { .. }, Pickable::default());
```
2025-02-24 21:09:39 +00:00
..
debug_picking.rs Upstream DebugPickingPlugin from bevy_mod_picking (#17177) 2025-01-07 05:19:50 +00:00
mesh_picking.rs Rename PickingBehavior to Pickable (#17266) 2025-01-12 05:36:52 +00:00
simple_picking.rs Rename trigger.entity() to trigger.target() (#16716) 2024-12-08 21:55:09 +00:00
sprite_picking.rs Make sprite picking opt-in (#17842) 2025-02-24 21:09:39 +00:00