From 0cedc047697bd07d054f0aa7bc76f5dce22d41cd Mon Sep 17 00:00:00 2001 From: TwistedTwigleg Date: Thu, 14 Oct 2021 18:26:44 -0400 Subject: Fix for SkeletonModification3Ds to work with the new bone pose changes, fixed global_pose_to_local_pose function --- scene/3d/skeleton_3d.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scene/3d') 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; -- cgit v1.2.3