Skip to content

Using a smaller pick target to highlight a parent mesh #215

Answered by aevyrie
cxreiff asked this question in Q&A
Discussion options

You must be logged in to vote

Highlighting looks at the Interaction state of an entity to determine what highlight to use (None, Clicked, Hovered).

Interaction::Clicked => global_defaults.pressed(&h_override),
Interaction::Hovered => global_defaults.hovered(&h_override),
Interaction::None => init_highlight.initial.to_owned(),

For your use case, I think all you need to do is add an eventlistener on your parent to update its Interaction component. This isn't handled out of the box because there isn't an obvious way to merge the states of multiple children with conflicting Interaction states.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@cxreiff
Comment options

@aevyrie
Comment options

@cxreiff
Comment options

@aevyrie
Comment options

@cxreiff
Comment options

Answer selected by cxreiff
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