bevy/crates/bevy_picking/src
Kristoffer Søholm 2c37bdeb47
Fix PickingInteraction change detection (#19488)
# Objective

Fixes #19464

## Solution

Instead of clearing previous `PickingInteractions` before updating, we
clear them last for those components that weren't updated, and use
`set_if_neq` when writing.

## Testing

I tried the sprite_picking example and it still works. 

You can add the following system to picking examples to check that
change detection works as intended:

```rust
fn print_picking(query: Query<(Entity, &PickingInteraction), Changed<PickingInteraction>>) {
    for (entity, interaction) in &query {
        println!("{entity} {interaction:?}");
    }
}
```
2025-06-08 16:29:13 +00:00
..
mesh_picking Updating mesh_picking doc to include RenderAssetUsages (#19413) 2025-05-29 18:44:50 +00:00
backend.rs Add boilerplate docs for PointerHits::new and HitData::new (#19259) 2025-05-19 19:22:07 +00:00
events.rs Mention in the docs for pointer events that these are in screen-space. (#19518) 2025-06-06 22:20:14 +00:00
hover.rs Fix PickingInteraction change detection (#19488) 2025-06-08 16:29:13 +00:00
input.rs Adopt consistent FooSystems naming convention for system sets (#18900) 2025-05-06 15:18:03 +00:00
lib.rs Adopt consistent FooSystems naming convention for system sets (#18900) 2025-05-06 15:18:03 +00:00
pointer.rs fix(picking): Location is not a Component anymore. (#19306) 2025-05-22 01:33:01 +00:00
window.rs Renamed EventWriter::send methods to write. (#17977) 2025-02-23 21:18:52 +00:00