mirror of
https://github.com/bevyengine/bevy
synced 2024-11-25 22:20:20 +00:00
d1927736de
# Objective Migrate `bevy_picking` to the required components API ## Solution - Made `PointerId` require `PointerLocation`, `PointerPress`, and `PointerInteraction` - Removed `PointerBundle` - Removed all engine uses of `PointerBundle` - Added convenience constructor `PointerLocation::new(location: Location)` ## Testing - ran unit tests - ran `sprite_picking` example, everything seemed fine. ## Migration Guide This API hasn't shipped yet, so I didn't bother with a deprecation. However, for any crates tracking main the changes are as follows: Previous api: ```rs commands.insert(PointerBundle::new(PointerId::Mouse)); commands.insert(PointerBundle::new(PointerId::Mouse).with_location(location)); ``` New api: ```rs commands.insert(PointerId::Mouse); commands.insert((PointerId::Mouse, PointerLocation::new(location))); ``` |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |