bevy_xpbd icon indicating copy to clipboard operation
bevy_xpbd copied to clipboard

Entity events support

Open musjj opened this issue 1 year ago • 0 comments

With all the talk about bevy_eventlistener getting upstreamed, it would be nice to have support for entity events in this library. This will greatly improve ergonomics for handling collisions, like:

commands
    .spawn((
        Name::new("Goblin"),
        HitPoints(50),
        On::<Collision>::run(|listener: Listener<Collision>| { /* handle collision */ }),
    ));

musjj avatar May 13 '24 15:05 musjj