mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 08:04:01 +02:00
Trying incremental rotations for Leap palms.
This commit is contained in:
parent
49c9d41dd5
commit
3446337cc5
1 changed files with 3 additions and 2 deletions
|
@ -139,8 +139,9 @@ void SkeletonModel::applyPalmData(int jointIndex, const QVector<int>& 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<IndexValue> fingerIndices;
|
||||
|
|
Loading…
Reference in a new issue