Demagicked a couple of numbers.

This commit is contained in:
Andrzej Kapolka 2013-11-07 16:24:46 -08:00
parent dabb670f1a
commit d35356348b
2 changed files with 3 additions and 2 deletions

View file

@ -665,7 +665,8 @@ void Avatar::updateArmIKAndConstraints(float deltaTime, AvatarJointID fingerTipJ
float distance = glm::length(armVector);
// don't let right hand get dragged beyond maximum arm length...
float armLength = _maxArmLength * 0.75f;
const float ARM_RETRACTION = 0.75f;
float armLength = _maxArmLength * ARM_RETRACTION;
if (distance > armLength) {
// reset right hand to be constrained to maximum arm length
fingerJoint.position = shoulderJoint.position;

View file

@ -140,7 +140,7 @@ void SkeletonModel::applyPalmData(int jointIndex, const QVector<int>& fingerJoin
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);
glm::angleAxis(90.0f, 0.0f, sign, 0.0f); // ninety degree rotation to face fingers forward from bind pose
setJointRotation(jointIndex, palmRotation, true);
// no point in continuing if there are no fingers