Skip to content

Commit

Permalink
fix(server_openvr): 🐛 Fix invalid hand skeleton root (#2380)
Browse files Browse the repository at this point in the history
  • Loading branch information
zmerp authored Sep 8, 2024
1 parent 87c32f5 commit aa0f432
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions alvr/server_openvr/cpp/alvr_server/Controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit aa0f432

Please sign in to comment.