wrist action works in rig now

This commit is contained in:
amantley 2019-02-14 18:17:31 -08:00
parent 5c26bbec5c
commit 40196dcb40
2 changed files with 4 additions and 4 deletions

View file

@ -285,7 +285,7 @@ const AnimPoseVec& AnimPoleVectorConstraint::evaluate(const AnimVariantMap& anim
qCDebug(animation) << " anim pole vector theta from rig right" << thetaFromRig;
fred = thetaFromRig;
}
/*
glm::quat relativeHandRotation = (midPose.inverse() * tipPose).rot();
relativeHandRotation = glm::normalize(relativeHandRotation);
@ -466,7 +466,7 @@ const AnimPoseVec& AnimPoleVectorConstraint::evaluate(const AnimVariantMap& anim
} else {
fred += twistCorrection;
}
*/
_lastTheta = 0.5f * _lastTheta + 0.5f * fred;
//qCDebug(animation) << "twist correction: " << twistCorrection << " flex correction: " << flexCorrection << " ulnar correction " << ulnarCorrection;

View file

@ -2028,9 +2028,9 @@ bool Rig::calculateElbowPoleVectorOptimized(int handIndex, int elbowIndex, int s
//qCDebug(animation) << "theta in rig " << left << " isLeft " << theta;
//return theta;
if (left) {
_animVars.set("thetaLeft", halfTheta);
_animVars.set("thetaLeft", theta);
} else {
_animVars.set("thetaRight", halfTheta);
_animVars.set("thetaRight", theta);
}
// convert theta back to pole vector
float lastDot = cosf(((180.0f - theta) / 180.0f)*PI);