Merge pull request #38203 from woollysammoth/multiple-ik-bug
Fixes SkeletonIK resetting other IK poses
This commit is contained in:
commit
b46e5c7b94
1 changed files with 9 additions and 1 deletions
|
@ -287,7 +287,15 @@ void FabrikInverseKinematic::solve(Task *p_task, real_t blending_delta, bool ove
|
|||
return; // Skip solving
|
||||
}
|
||||
|
||||
p_task->skeleton->clear_bones_global_pose_override();
|
||||
p_task->skeleton->set_bone_global_pose_override(p_task->chain.chain_root.bone, Transform(), 0.0, true);
|
||||
|
||||
if (p_task->chain.middle_chain_item) {
|
||||
p_task->skeleton->set_bone_global_pose_override(p_task->chain.middle_chain_item->bone, Transform(), 0.0, true);
|
||||
}
|
||||
|
||||
for (int i = 0; i < p_task->chain.tips.size(); i += 1) {
|
||||
p_task->skeleton->set_bone_global_pose_override(p_task->chain.tips[i].chain_item->bone, Transform(), 0.0, true);
|
||||
}
|
||||
|
||||
make_goal(p_task, p_task->skeleton->get_global_transform().affine_inverse().scaled(p_task->skeleton->get_global_transform().get_basis().get_scale()), blending_delta);
|
||||
|
||||
|
|
Loading…
Reference in a new issue