Skip to content

Commit

Permalink
Emit picking event streams (bevyengine#16105)
Browse files Browse the repository at this point in the history
# Objective

In `bevy_mod_picking` events are accessible through event listeners or
`EventReader`s. When I replaced event listeners with observers, I
removed the `EventReader` for simplicity. This adds it back.

## Solution

All picking events are now properly registered, and can be accessed
through `EventReader<Pointer<E>>`. `Pointer` now tracks the entity the
event targeted initially, and this can also be helpful in observers
(which don't currently do this).

## Testing

The picking examples run fine. This shouldn't really change anything.

---------

Co-authored-by: Aevyrie <aevyrie@gmail.com>
  • Loading branch information
NthTensor and aevyrie authored Oct 27, 2024
1 parent 54b323e commit 7451900
Show file tree
Hide file tree
Showing 2 changed files with 166 additions and 112 deletions.
Loading

0 comments on commit 7451900

Please sign in to comment.