From aa0f4329a1a5553a46ada483cd7fd0d4db5599f5 Mon Sep 17 00:00:00 2001 From: zarik5 Date: Sun, 8 Sep 2024 21:53:57 +0200 Subject: [PATCH] fix(server_openvr): :bug: Fix invalid hand skeleton root (#2380) --- alvr/server_openvr/cpp/alvr_server/Controller.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/alvr/server_openvr/cpp/alvr_server/Controller.cpp b/alvr/server_openvr/cpp/alvr_server/Controller.cpp index 6289fdbeca..0379b61227 100644 --- a/alvr/server_openvr/cpp/alvr_server/Controller.cpp +++ b/alvr/server_openvr/cpp/alvr_server/Controller.cpp @@ -307,6 +307,15 @@ bool Controller::onPoseUpdate(float predictionS, FfiHandData handData) { } else if (handSkeleton != nullptr) { vr::VRBoneTransform_t boneTransform[SKELETON_BONE_COUNT] = {}; + boneTransform[0].orientation.w = 1.0; + boneTransform[0].orientation.x = 0.0; + boneTransform[0].orientation.y = 0.0; + boneTransform[0].orientation.z = 0.0; + boneTransform[0].position.v[0] = 0.0; + boneTransform[0].position.v[1] = 0.0; + boneTransform[0].position.v[2] = 0.0; + boneTransform[0].position.v[3] = 1.0; + // NB: start from index 1 to skip the root bone for (int j = 1; j < 31; j++) { boneTransform[j].orientation.w = handSkeleton->jointRotations[j].w;