diff options
author | Yuri Roubinsky <chaosus89@gmail.com> | 2021-11-17 21:35:14 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-17 21:35:14 +0300 |
commit | cd4630fd4a7e5c6aeec103c34e381cd0cca76ca7 (patch) | |
tree | d98e86108ac0040753b5ec8ed17e99787bc8604f /scene/resources | |
parent | e445bacd90688e85d9720353b70814cdbf66e7db (diff) | |
parent | 8be89357ced8990e4c0a578441fcb6a19a582494 (diff) |
Merge pull request #55062 from Chaosus/fix_colorpicker_circle
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/skeleton_modification_2d_ccdik.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/resources/skeleton_modification_2d_ccdik.cpp b/scene/resources/skeleton_modification_2d_ccdik.cpp index 6eab8d4afe..bea42109cb 100644 --- a/scene/resources/skeleton_modification_2d_ccdik.cpp +++ b/scene/resources/skeleton_modification_2d_ccdik.cpp @@ -205,8 +205,8 @@ void SkeletonModification2DCCDIK::_execute_ccdik_joint(int p_joint_idx, Node2D * } else { // How to rotate from the tip: get the difference of rotation needed from the tip to the target, from the perspective of the joint. // Because we are only using the offset, we do not need to account for the bone angle of the Bone2D node. - float joint_to_tip = operation_transform.get_origin().angle_to_point(p_tip->get_global_position()); - float joint_to_target = operation_transform.get_origin().angle_to_point(p_target->get_global_position()); + float joint_to_tip = p_tip->get_global_position().angle_to_point(operation_transform.get_origin()); + float joint_to_target = p_target->get_global_position().angle_to_point(operation_transform.get_origin()); operation_transform.set_rotation( operation_transform.get_rotation() + (joint_to_target - joint_to_tip)); } |