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

Remove bodies that are disconnected from the scene graph #6122

Merged
merged 1 commit into from
Jun 20, 2023

Conversation

johnshaughnessy
Copy link
Contributor

@johnshaughnessy johnshaughnessy commented Jun 13, 2023

We have not diagnosed why, but physics bodies sometimes stick around after their associated object3D has been removed from the scene graph. This PR removes the physics body when we detect this case.

While a more correct fix would be to prevent this from happening, we have not found a reliable reproduction step. Since the error spams the log and the body is never removed, this PR at least fixes those things.

Copy link
Contributor

@nikk15 nikk15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM!

@keianhzo keianhzo self-requested a review June 20, 2023 17:59
Copy link
Contributor

@keianhzo keianhzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM too

@johnshaughnessy johnshaughnessy merged commit 40dce4d into master Jun 20, 2023
10 of 12 checks passed
@johnshaughnessy johnshaughnessy deleted the bug/physics-bodies branch June 20, 2023 18:03
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

Successfully merging this pull request may close these issues.

None yet

3 participants