Skip to content
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

Removing all Children breaks physics #600

Open
Wolftousen opened this issue Dec 21, 2024 · 0 comments
Open

Removing all Children breaks physics #600

Wolftousen opened this issue Dec 21, 2024 · 0 comments

Comments

@Wolftousen
Copy link

Was working on cleaning up some entities today and encountered some odd behavior when I removed all the children of my Kinematic Entity that is controlled by the user.

For instance, i had a rectangle as the kinematic entity and effectively had a chain attached to it. I could press left and right to move the rectangle at an accelerating rate and then space to remove the chain.

This resulted in the left and right movement going super speed even though printing values to the console still reported what I would expect.

Removing the chain involved just looping over all the children and removing them from the parent and despawning them. When you remove all the children from an entity, Bevy also removes the Children component.

I added in a dummy empty child and then deleting everything else and the broken physics stopped occurring. Is there a dependency on the Children component existing somewhere or an issue with it existing at one point and then not existing later?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant