From 3446337cc5e4f447663a2bcdc0ed43af6221cb44 Mon Sep 17 00:00:00 2001 From: Andrzej Kapolka Date: Fri, 8 Nov 2013 15:11:56 -0800 Subject: [PATCH] Trying incremental rotations for Leap palms. --- interface/src/avatar/SkeletonModel.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/interface/src/avatar/SkeletonModel.cpp b/interface/src/avatar/SkeletonModel.cpp index adf708a9bd..e1dde68824 100644 --- a/interface/src/avatar/SkeletonModel.cpp +++ b/interface/src/avatar/SkeletonModel.cpp @@ -139,8 +139,9 @@ void SkeletonModel::applyPalmData(int jointIndex, const QVector& fingerJoin const FBXGeometry& geometry = _geometry->getFBXGeometry(); setJointPosition(jointIndex, palm.getPosition()); float sign = (jointIndex == geometry.rightHandJointIndex) ? 1.0f : -1.0f; - glm::quat palmRotation = rotationBetween(_rotation * IDENTITY_UP, -palm.getNormal()) * _rotation * - glm::angleAxis(90.0f, 0.0f, sign, 0.0f); // ninety degree rotation to face fingers forward from bind pose + glm::quat palmRotation; + getJointRotation(jointIndex, palmRotation, true); + palmRotation = rotationBetween(palmRotation * IDENTITY_UP, -palm.getNormal()) * palmRotation; // sort the finger indices by raw x, get the average direction QVector fingerIndices;