diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-02-09 22:14:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-09 22:14:31 +0100 |
commit | 9f9d6c6cc183101cff07073857e7a223e0acbc6a (patch) | |
tree | 6fc4c91321788d43aafb7a4627e45e0de0939e00 /scene/animation/skeleton_ik.cpp | |
parent | d617df5f3460a2bb55ce41497fdc24a885bf746c (diff) | |
parent | bb0358dd8d3ed99c9fb3545efdf821d28e73b68b (diff) |
Merge pull request #35656 from ericrybick/35460-fix2
Use a new approach to fix bone pose override not being reset when IK animation is stopped.
Diffstat (limited to 'scene/animation/skeleton_ik.cpp')
-rw-r--r-- | scene/animation/skeleton_ik.cpp | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/scene/animation/skeleton_ik.cpp b/scene/animation/skeleton_ik.cpp index 46028a9ce2..518c243dd0 100644 --- a/scene/animation/skeleton_ik.cpp +++ b/scene/animation/skeleton_ik.cpp @@ -329,17 +329,6 @@ void FabrikInverseKinematic::solve(Task *p_task, real_t blending_delta, bool ove } } -void FabrikInverseKinematic::reset(Task *p_task) { - ChainItem *ci(&p_task->chain.chain_root); - while (ci) { - p_task->skeleton->set_bone_global_pose_override(ci->bone, Transform(), 0); - if (!ci->children.empty()) - ci = &ci->children.write[0]; - else - ci = NULL; - } -} - void SkeletonIK::_validate_property(PropertyInfo &property) const { if (property.name == "root_bone" || property.name == "tip_bone") { @@ -542,8 +531,6 @@ void SkeletonIK::start(bool p_one_time) { void SkeletonIK::stop() { set_process_internal(false); - if (task) - FabrikInverseKinematic::reset(task); } Transform SkeletonIK::_get_target_transform() { |