summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-04-15 23:03:04 +0200
committerGitHub <noreply@github.com>2021-04-15 23:03:04 +0200
commit0c8ec7237071df787fc598c9014b4a9746a1ce18 (patch)
tree5c8f0c6fd7df0f4005255443ddc8a48760e3b8bc
parent75875c068554e5747e671e3c49aefdfc895567b4 (diff)
parent9ebdf812df82e0605263541fbe44a4a8db48396f (diff)
Merge pull request #47933 from TwistedTwigleg/skeletonik_changes_and_bug_fixes_regressionfix2
Changed SkeletonIK3D to clear bone overrides when stopping
-rw-r--r--scene/3d/skeleton_ik_3d.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/scene/3d/skeleton_ik_3d.cpp b/scene/3d/skeleton_ik_3d.cpp
index 6cde6a9b17..898f94ccc1 100644
--- a/scene/3d/skeleton_ik_3d.cpp
+++ b/scene/3d/skeleton_ik_3d.cpp
@@ -270,7 +270,6 @@ void FabrikInverseKinematic::solve(Task *p_task, real_t blending_delta, bool ove
return; // Skip solving
}
- // This line below is part of the problem - removing it fixes the issue with BoneAttachment nodes...
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) {
@@ -567,6 +566,9 @@ void SkeletonIK3D::start(bool p_one_time) {
void SkeletonIK3D::stop() {
set_process_internal(false);
+ if (skeleton) {
+ skeleton->clear_bones_global_pose_override();
+ }
}
Transform SkeletonIK3D::_get_target_transform() {