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 unbound child bones of the PhysicalBone aren't modified #92931

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

TokageItLab
Copy link
Member

@TokageItLab TokageItLab commented Jun 9, 2024

Fixes #91606.

PhysicalBoneSimulator caches all bones and modify only bound bones, but it stores only the global pose, so unbound bones will not be modified since it doesn’t process recursively.

There is no need to change the child bones global pose recursively to fix the problem. The issue is that the skeleton reflects bones that are not moving, so ignoring the unbound bones fixes the problem.

@TokageItLab TokageItLab added this to the 4.3 milestone Jun 9, 2024
@TokageItLab TokageItLab requested review from a team June 9, 2024 09:07
@TokageItLab TokageItLab requested a review from a team as a code owner June 9, 2024 09:07
@TokageItLab TokageItLab force-pushed the child-physical-bone branch 2 times, most recently from 8e70ccd to 493f573 Compare June 9, 2024 09:08
@LiveTrower
Copy link

It seems that the problem is not completely solved.

ragdoll.mp4

testragdoll.zip

@TokageItLab TokageItLab force-pushed the child-physical-bone branch 2 times, most recently from 437a63a to 5bf1524 Compare June 11, 2024 00:01
@TokageItLab
Copy link
Member Author

TokageItLab commented Jun 11, 2024

@LiveTrower The problem seems to be dependent on the update order of the bone.

At any rate, I knew how to make it work correctly, and since this is a bad regression, I applied it with some comments. But the known problem is that the current way of updating the global pose of the Skeleton is not good performance-wise, so a follow up must be needed later.

We have already sometimes discussed this within the animation team before, but ideally there should be a fundamental solution since any SkeletonModifier may have this performance issue in the future.

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.

Seems ok as a stopgap solution.

@akien-mga akien-mga merged commit 3421c9f into godotengine:master Jun 17, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@TokageItLab TokageItLab deleted the child-physical-bone branch June 29, 2024 11:45
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.

[4.3Dev6,Beta1]Bones that are not bound to PhysicalBone3D will not follow the movement of their parent bones
3 participants