From 9307d851a94ac9fc75372ffa8c047a2193401d8d Mon Sep 17 00:00:00 2001 From: Lyuma Date: Thu, 18 May 2023 03:14:45 -0700 Subject: [PATCH] Fix get_bone_pose_global_no_override() (cherry picked from commit 565803ce3dbaabbd1cff76e3191c4297f212a0de) --- scene/3d/skeleton_3d.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scene/3d/skeleton_3d.cpp b/scene/3d/skeleton_3d.cpp index 1b468790790..4ea80fb3735 100644 --- a/scene/3d/skeleton_3d.cpp +++ b/scene/3d/skeleton_3d.cpp @@ -925,18 +925,18 @@ void Skeleton3D::force_update_bone_children_transforms(int p_bone_idx) { if (b.parent >= 0) { b.pose_global = bonesptr[b.parent].pose_global * pose; - b.pose_global_no_override = b.pose_global; + b.pose_global_no_override = bonesptr[b.parent].pose_global_no_override * pose; } else { b.pose_global = pose; - b.pose_global_no_override = b.pose_global; + b.pose_global_no_override = pose; } } else { if (b.parent >= 0) { b.pose_global = bonesptr[b.parent].pose_global * b.rest; - b.pose_global_no_override = b.pose_global; + b.pose_global_no_override = bonesptr[b.parent].pose_global_no_override * b.rest; } else { b.pose_global = b.rest; - b.pose_global_no_override = b.pose_global; + b.pose_global_no_override = b.rest; } } if (rest_dirty) {