Open
Description
What problem does this solve or what need does it fill?
The fact that the B
in Trigger<E, B: Bundle>
currently means OR
instead of AND
is confusing enough that it even surprised a maintainer. Everywhere else in bevy, tuples (which bundles can be) mean AND
, so we should change Trigger
's default behavior.
What solution would you like?
The following code should work (but doesn't currently):
fn my_observer(trigger: Trigger<Foo, (A, B)>) {
}
// This *should not* trigger the above observer:
world.trigger(Foo, world.component::<A>());
// But *this* should:
world.trigger(Foo, (world.component::<A>(), world.component::<B>());
Additional context
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Observer overhaul