Skip to content
Discussion options

You must be logged in to vote

This is because Add uses an EntityComponentTrigger, whereas your GroundClick event uses an EntityTrigger.

You can sort of fix this by using:

#[derive(EntityEvent)]
#[entity_event(trigger = EntityComponentsTrigger<'a>)]
struct GrouncClick { ... }

To trigger it, you then need to use Commands::trigger_with, and then pass an EntityComponentsTrigger with the appropriate component ID(s).

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by cqh963852
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants