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 ragdoll simulation when parent was readded to scene #48823

Merged
merged 1 commit into from
May 19, 2021

Conversation

timothyqiu
Copy link
Member

@timothyqiu timothyqiu commented May 19, 2021

This PR fixes #48705, also applies to the 3.x branch.

The PhysicalBone's bone_id was kept when exiting the tree. But when entering the tree, rebind and setup of the bone only happen if bone_id should be changed. Also, it does not make sense to keep the bone_id because the PhysicalBone may be added to a different Skeleton afterward.

@timothyqiu timothyqiu requested a review from a team as a code owner May 19, 2021 02:33
@pouleyKetchoupp pouleyKetchoupp requested a review from a team May 19, 2021 04:20
@akien-mga akien-mga added this to the 4.0 milestone May 19, 2021
@akien-mga akien-mga added cherrypick:3.3 cherrypick:3.x Considered for cherry-picking into a future 3.x release labels May 19, 2021
Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

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

Makes sense to me. CC @AndreaCatania @pouleyKetchoupp

Copy link
Contributor

@AndreaCatania AndreaCatania left a comment

Choose a reason for hiding this comment

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

Yup, that's correct. Thanks!

@akien-mga akien-mga merged commit 6cc6930 into godotengine:master May 19, 2021
@akien-mga
Copy link
Member

Thanks!

@akien-mga
Copy link
Member

Cherry-picked for 3.4.

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label May 19, 2021
@akien-mga
Copy link
Member

Cherry-picked for 3.3.2.

@timothyqiu timothyqiu deleted the bone-id branch May 19, 2021 23:42
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.

Ragdoll simulation is broken if parent was removed from and then and readded to scene
4 participants