-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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 for SkeletonModification3Ds to work with the new bone pose changes. #53821
Fix for SkeletonModification3Ds to work with the new bone pose changes. #53821
Conversation
@TwistedTwigleg The default transform of the pose has been changed to "rest" instead of |
Oh okay! I'll quickly give Edit: Using |
Another way of saying what @TokageItLab said was: If you start from a Godot 3.x pose in this system, we can just multiply by rest.affine_inverse(). Like
|
7130b29
to
d40a0d5
Compare
Okay, FABRIK is fixed now! I had to change how it works so that it uses global poses instead of local ones, as well as making it save the transforms internally. This does have some benefits though, as now the code is much more compact, less conversions are needed (more performance), and it's easier to understand. With these changes done, I'm confident that the IK modifications in 3D should be back to fully working and have removed the draft status on this PR. However, while working on this I found what I believe was the actual culprit: the For example, the following line of code is how this PR applies the global pose to the skeleton (line
The transform passed, However, the follow line of code doesn't work, even though it would have worked prior to the changes in #53765
Which is a problem, because it means that valid global poses are not being correctly converted to local poses, meaning the While it's not a blocking issue for this PR and the skeleton modification system currently, I just changed the FABRIK code to work entirely in global pose space and to cache the transforms it needs, it needs to be fixed. I can make a new issue for this if needed though. |
Please do! |
Will do! I’ll get a quick replication project and issue made this weekend 👍 |
…s, fixed global_pose_to_local_pose function
d40a0d5
to
0cedc04
Compare
I fixed the issue with the |
Thanks! |
Closes #53794
Edit: Closes #53895 as well, see comments below
Most of the fixes were pretty easy and the majority of the IK modifications work now without any issues. However, FABRIK is providing difficult due to changes involving bone positions, which is causing it not to work.
It seems that the previous method of setting the
local_pose_override
position toVector3(0, 0, 0)
no longer works for setting the bone at its default local position, which was causing it not work. Using the global pose without overrides as the position sort of works, but it's not ideal nor fully working right now.I have some ideas on what might work to solve it, but haven't had the time to investigate yet. I'll try to look at this further soon though.