Skip to content

Commit

Permalink
Fix for regression in SkeletonIK code
Browse files Browse the repository at this point in the history
(cherry picked from commit c15e233)
  • Loading branch information
TwistedTwigleg authored and akien-mga committed Mar 19, 2021
1 parent 87573e9 commit f50c806
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scene/animation/skeleton_ik.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,10 @@ void FabrikInverseKinematic::solve(Task *p_task, real_t blending_delta, bool ove
p_task->skeleton->set_bone_global_pose_override(p_task->chain.tips[i].chain_item->bone, Transform(), 0.0, true);
}

// Update the initial root transform
p_task->chain.chain_root.initial_transform = p_task->skeleton->get_bone_global_pose(p_task->chain.chain_root.bone);
p_task->chain.chain_root.current_pos = p_task->chain.chain_root.initial_transform.origin;

make_goal(p_task, p_task->skeleton->get_global_transform().affine_inverse(), blending_delta);

if (p_use_magnet && p_task->chain.middle_chain_item) {
Expand Down

0 comments on commit f50c806

Please sign in to comment.