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

Fix not clearing a Joint3D with only a B node when removing the B node #45167

Merged
merged 1 commit into from
Jan 14, 2021

Conversation

madmiraal
Copy link
Contributor

@madmiraal madmiraal commented Jan 13, 2021

#44703 and it's 3.2 version #44704 fail to clear the node attached to a Joint3D when the node is removed, if the node is a B node and it's the only node. Therefore, the RigidBody remains connected to the Joint3D and Bullet physics raises the error:

ERROR: A body connected to joints was removed.
   at: remove_rigid_body_constraints:  (modules/bullet/space_bullet.cpp:485)

This PR addresses the issue, by ensuring that the RID associated with each node is not swapped when there is only a B node.

Fixes #45166.

@madmiraal madmiraal added this to the 4.0 milestone Jan 13, 2021
@fire fire requested review from a team and removed request for a team January 13, 2021 20:51
@pouleyKetchoupp pouleyKetchoupp requested a review from a team January 13, 2021 22:33
@akien-mga akien-mga merged commit 156d700 into godotengine:master Jan 14, 2021
@akien-mga
Copy link
Member

Thanks!

@madmiraal madmiraal deleted the fix-44703 branch January 14, 2021 09:39
@madmiraal madmiraal mentioned this pull request Jan 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error when closing a project with a Joint3D with only a B node attached
3 participants