-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Add Without<Parent>
filter to sync_simple_transforms
' orphaned entities query
#9518
Add Without<Parent>
filter to sync_simple_transforms
' orphaned entities query
#9518
Conversation
…` to retrieve entities orphaned since the last update. Without this filter, `sync_simple_transforms` will overwrite the `GlobalTransform` of entities that had their parent removed and then replaced in the same frame.
Without<Parent>
filter to sync_simple_transforms
query for orphaned entitiesWithout<Parent>
filter to sync_simple_transforms
' orphaned entities query
Can you add some regression tests to make sure that this fixes the issues? |
Definitely a reasonable fix, but I'd also like to see a test or three. |
Will do. I'd like to get @nicopap to review as well. I think my understanding of the problem is correct, but want to make sure that there wasn't a good reason for not filtering by |
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.
I didn't think of entities which Parent
component was removed and later added back. I was thinking "if the Parent
component is removed, then why check for Without<Parent>
?", glossing over situations where it is removed and later added back.
…tities query (bevyengine#9518) # Objective `sync_simple_transforms` only checks for removed parents and doesn't filter for `Without<Parent>`, so it overwrites the `GlobalTransform` of non-orphan entities that were orphaned and then reparented since the last update. Introduced by bevyengine#7264 ## Solution Filter for `Without<Parent>`. Fixes bevyengine#9517, bevyengine#9492 ## Changelog `sync_simple_transforms`: * Added a `Without<Parent>` filter to the orphaned entities query.
Objective
sync_simple_transforms
only checks for removed parents and doesn't filter forWithout<Parent>
, so it overwrites theGlobalTransform
of non-orphan entities that were orphaned and then reparented since the last update.Introduced by #7264
Solution
Filter for
Without<Parent>
.Fixes #9517, #9492
Changelog
sync_simple_transforms
:Without<Parent>
filter to the orphaned entities query.