-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Objective - Intended to resolve #15290. - Fix four duplicate `DragEnd` firing when drag finished. - Fix redundant `DragStart` firing when dragging across pick-able entities. - Fix `Click` coming after `Drop` and obliterating finished drag interactions. Big thanks to B. Reinhart for testing picking in their codebase and identifying these issues early. ## Solution - Fix press & drag state being cleared after the first entity is read from the hover map on pointer release, rather than after all entities are read. This caused only the first hovered entity to receive `Up` and `Click` events. - Fixes `Down` being determined using the `previous_hover_map` rather than `hover_map`, a regression compared to `bevy_mod_picking`. I think this is what was messing up drag events. - Fixes and issue where `PointerEnd` would fire multiple times and `PointerStart` would fire when dragging onto a new entity. - Re-orders events to make them easier to handle. `Out` now fired before `DragLeave` and `Click/Up` now fire before `DragDrop`. - Generally refactors the picking event code to be more clean and sane. ## Testing These changes are currently sporadically tested.
- Loading branch information
Showing
1 changed file
with
141 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters