Open ItsDoot opened 2 hours ago
We should add a second generic, defaulting to AND, to allow users to get the same behavior back if they want it.
Note that the implementation here is difficult as the observer lookup structure does not support this in any way so care will have to be taken not to regress performance when addressing this. I wouldn't consider it straightforward.
What problem does this solve or what need does it fill?
The fact that the
B
inTrigger<E, B: Bundle>
currently meansOR
instead ofAND
is confusing enough that it even surprised a maintainer. Everywhere else in bevy, tuples (which bundles can be) meanAND
, so we should changeTrigger
's default behavior.What solution would you like?
The following code should work (but doesn't currently):
Additional context
Moment of confusion on discord.