Merge pull request #96093 from m4gr3d/fix_skeleton_invalid_bone_pose_update

Fix invalid `Skeleton3D` bone pose updates
This commit is contained in:
Rémi Verschelde 2024-08-26 22:45:58 +02:00
commit c589801c23
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 5 additions and 0 deletions

View File

@ -207,6 +207,11 @@ void XRHandModifier3D::_process_modification() {
// Apply previous relative transforms if they are stored.
for (int joint = 0; joint < XRHandTracker::HAND_JOINT_MAX; joint++) {
const int bone = joints[joint].bone;
if (bone == -1) {
continue;
}
if (bone_update == BONE_UPDATE_FULL) {
skeleton->set_bone_pose_position(joints[joint].bone, previous_relative_transforms[joint].origin);
}