Skip to content

Commit d8bf468

Browse files
committed
Add note about Over/Out hierarchy issues
1 parent 3ee6c20 commit d8bf468

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

crates/bevy_picking/src/events.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,11 @@ pub struct PickingEventWriters<'w> {
314314
/// receive [`Out`] and then entity B will receive [`Over`]. No entity will ever
315315
/// receive both an [`Over`] and and a [`Out`] event during the same frame.
316316
///
317+
/// When we account for event bubbling, this is no longer ture. When focus shifts
318+
/// between children, parent entities may receive reduntant [`Out`] → [`Over`] pairs.
319+
/// In the context of UI, this is especially problematic. Additional hierarchy-aware
320+
/// events will be added in a future release.
321+
///
317322
/// Both [`Click`] and [`Up`] target the entity hovered in the *previous frame*,
318323
/// rather than the current frame. This is because touch pointers hover nothing
319324
/// on the frame they are released. The end effect is that these two events can

0 commit comments

Comments
 (0)