summaryrefslogtreecommitdiff
path: root/scene/3d
diff options
context:
space:
mode:
authorTwistedTwigleg <beard.noah@gmail.com>2021-10-14 18:26:44 -0400
committerTwistedTwigleg <beard.noah@gmail.com>2021-10-16 16:34:31 -0400
commit0cedc047697bd07d054f0aa7bc76f5dce22d41cd (patch)
tree7c5ffb571db0cbefd37835fa1efb40a561f9875d /scene/3d
parentf90047f1583cdb8f4d7346a626b4992406761331 (diff)
Fix for SkeletonModification3Ds to work with the new bone pose changes, fixed global_pose_to_local_pose function
Diffstat (limited to 'scene/3d')
-rw-r--r--scene/3d/skeleton_3d.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/3d/skeleton_3d.cpp b/scene/3d/skeleton_3d.cpp
index 14506fd9bd..fbc3767151 100644
--- a/scene/3d/skeleton_3d.cpp
+++ b/scene/3d/skeleton_3d.cpp
@@ -1113,7 +1113,7 @@ Transform3D Skeleton3D::global_pose_to_local_pose(int p_bone_idx, Transform3D p_
ERR_FAIL_INDEX_V(p_bone_idx, bone_size, Transform3D());
if (bones[p_bone_idx].parent >= 0) {
int parent_bone_idx = bones[p_bone_idx].parent;
- Transform3D conversion_transform = bones[parent_bone_idx].pose_global.affine_inverse();
+ Transform3D conversion_transform = get_bone_global_pose(parent_bone_idx).affine_inverse();
return conversion_transform * p_global_pose;
} else {
return p_global_pose;