From 33fd64c68c908800ca24d569e244d08e23ba2f30 Mon Sep 17 00:00:00 2001 From: amantley Date: Thu, 21 Feb 2019 09:00:23 -0800 Subject: [PATCH] direction on compare in positional theta function --- libraries/animation/src/Rig.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libraries/animation/src/Rig.cpp b/libraries/animation/src/Rig.cpp index 9139776612..f2b4be077f 100644 --- a/libraries/animation/src/Rig.cpp +++ b/libraries/animation/src/Rig.cpp @@ -1721,10 +1721,10 @@ static float getHandPositionTheta(glm::vec3 armToHand, float defaultArmLength, b const float LOWER_ANATOMICAL_ANGLE = 175.0f; const float UPPER_ANATOMICAL_ANGLE = 50.0f; - if (handPositionTheta < LOWER_ANATOMICAL_ANGLE) { + if (handPositionTheta > LOWER_ANATOMICAL_ANGLE) { handPositionTheta = LOWER_ANATOMICAL_ANGLE; } - if (handPositionTheta > UPPER_ANATOMICAL_ANGLE) { + if (handPositionTheta < UPPER_ANATOMICAL_ANGLE) { handPositionTheta = UPPER_ANATOMICAL_ANGLE; } @@ -1876,7 +1876,9 @@ bool Rig::calculateElbowPoleVectorOptimized(int handIndex, int elbowIndex, int s // get the pole vector theta based on the hand position relative to the shoulder. float positionalTheta = getHandPositionTheta(armToHand, defaultArmLength, left); - + if (left) { + qCDebug(animation) << "positional theta left "<< positionalTheta; + } // now we calculate the contribution of the hand rotation relative to the arm glm::quat relativeHandRotation = (elbowPose.inverse() * handPose).rot();