File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -1116,6 +1116,12 @@ void Skeleton3D::_force_update_bone_children_transforms(int p_bone_idx) const {
11161116
11171117 // Loop through nested set.
11181118 for (int offset = 0 ; offset < bone_size; offset++) {
1119+ if (rest_dirty) {
1120+ int current_bone_idx = nested_set_offset_to_bone_index[offset];
1121+ Bone &b = bonesptr[current_bone_idx];
1122+ b.global_rest = b.parent >= 0 ? bonesptr[b.parent ].global_rest * b.rest : b.rest ; // Rest needs update apert from pose.
1123+ }
1124+
11191125 if (!bone_global_pose_dirty[offset]) {
11201126 continue ;
11211127 }
@@ -1140,9 +1146,6 @@ void Skeleton3D::_force_update_bone_children_transforms(int p_bone_idx) const {
11401146 b.global_pose = b.rest ;
11411147 }
11421148 }
1143- if (rest_dirty) {
1144- b.global_rest = b.parent >= 0 ? bonesptr[b.parent ].global_rest * b.rest : b.rest ;
1145- }
11461149
11471150#ifndef DISABLE_DEPRECATED
11481151 if (bone_enabled) {
You can’t perform that action at this time.
0 commit comments