aevyrie / bevy_mod_picking

Picking and pointer events for Bevy.
https://crates.io/crates/bevy_mod_picking
Apache License 2.0
764 stars 170 forks source link

How to disable multiselect? #310

Closed ddorstijn closed 6 months ago

ddorstijn commented 6 months ago

I am sorry if this is a stupid question. But I can't seem to find a way to disable multi select. How can I do this?

aevyrie commented 6 months ago

You can either: remove PointerMultiSelect from the pointer, for per-pointer control: https://github.com/aevyrie/bevy_mod_picking/blob/893336bf64265ee7d4bec2e1fefc16fb3e96e57a/crates/bevy_picking_selection/src/lib.rs#L79

or, you can disable the default multiselect system, and provide your own that can be toggled: https://github.com/aevyrie/bevy_mod_picking/blob/893336bf64265ee7d4bec2e1fefc16fb3e96e57a/crates/bevy_picking_selection/src/lib.rs#L37