mirror of
https://github.com/overte-org/overte.git
synced 2025-04-23 15:13:41 +02:00
Demagicked a couple of numbers.
This commit is contained in:
parent
dabb670f1a
commit
d35356348b
2 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue