Skip to content

Commit

Permalink
Refactor setting pose logic in IKBoneSegment3D::_set_optimal_rotation…
Browse files Browse the repository at this point in the history
… function
  • Loading branch information
fire committed Mar 17, 2024
1 parent acfac76 commit 91851f2
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/ik_bone_segment_3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,15 +184,12 @@ void IKBoneSegment3D::_set_optimal_rotation(Ref<IKBone3D> p_for_bone, PackedVect
break;
} else {
got_closer = false;
p_for_bone->set_pose(prev_transform);
}
}
i++;
} while (i < default_stabilizing_pass_count && !got_closer);

if (!got_closer) {
p_for_bone->set_pose(prev_transform);
}

if (root == p_for_bone) {
previous_deviation = INFINITY;
}
Expand Down

0 comments on commit 91851f2

Please sign in to comment.