Skip to content

Commit

Permalink
Only pass first three thumb bones
Browse files Browse the repository at this point in the history
  • Loading branch information
Nyabsi committed Jul 30, 2024
1 parent 5b7bc29 commit 98ac279
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/TrackedController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ void TrackedController::UpdateSkeletalPose(LeapHand hand)
size_t index = GetFingerBoneIndex(i);
bool thumb = (i == 0);

for (size_t j = 0, k = (thumb ? 3 : 4); j < k; j++)
for (size_t j = 0, k = (thumb ? 2 : 4); j < k; j++)
{
glm::quat rotation;
GetFingerBoneLocalRotation(hand, i, (thumb ? (j + 1) : j), rotation, thumb);
Expand Down Expand Up @@ -297,7 +297,7 @@ void TrackedController::UpdateSkeletalPose(LeapHand hand)
glm::mat4 chainMatrix(wristMatrix);
const size_t chainIndex = GetFingerBoneIndex(i);

for (size_t j = 0; j < ((i == HF_Thumb) ? 3 : 4); j++)
for (size_t j = 0; j < ((i == HF_Thumb) ? 2 : 4); j++)
{
ConvertVector3(m_boneTransform[chainIndex + j].position, position);
ConvertQuaternion(m_boneTransform[chainIndex + j].orientation, rotation);
Expand Down

0 comments on commit 98ac279

Please sign in to comment.