-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix TouchSticks with parents in the hierarchy #6
Fix TouchSticks with parents in the hierarchy #6
Conversation
Pretty sure we can just ignore Transform and always grab data from GlobalTransform. GlobalTransform and Transform are ALWAYS equal if the entity does not have parents? edit |
mut interaction_areas: Query< | ||
(&mut TouchStick<S>, &GlobalTransform, &Node), | ||
With<TouchStickInteractionArea>, | ||
>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change forces the interaction area and stick to be on the same entity. The idea was that you should be able to have multiple interactable zones for the same stick to block out other ui etc. And also other ways of defining the interactable zone (e.g. entire screen) But the feature is only half done.
With this change, the marker TouchStickInteractionArea
serves no purpose and could be removed.
However, this does kind of solve the issue with multiple sticks, so maybe it's ok for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case it would probably have been better to not merge main into the pr (since it wasn't needed to fix the issue? and there were not conflicts?)
Transform is relative too the parent ui node
this fixes it