mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-05-04 21:39:43 +02:00
Scratch that; didn't work.
This commit is contained in:
parent
76d8bd0a9c
commit
c76af1ca12
1 changed files with 7 additions and 2 deletions
|
@ -176,10 +176,15 @@ void SkeletonModel::applyPalmData(int jointIndex, const QVector<int>& fingerJoin
|
||||||
float proportion = fingerIndices.size() / (float)fingerJointIndices.size();
|
float proportion = fingerIndices.size() / (float)fingerJointIndices.size();
|
||||||
for (int i = 0; i < fingerJointIndices.size(); i++) {
|
for (int i = 0; i < fingerJointIndices.size(); i++) {
|
||||||
int fingerIndex = fingerIndices.at(roundf(i * proportion)).index;
|
int fingerIndex = fingerIndices.at(roundf(i * proportion)).index;
|
||||||
|
glm::vec3 fingerVector = palm.getFingers()[fingerIndex].getTipPosition() -
|
||||||
|
palm.getFingers()[fingerIndex].getRootPosition();
|
||||||
|
|
||||||
int fingerJointIndex = fingerJointIndices.at(i);
|
int fingerJointIndex = fingerJointIndices.at(i);
|
||||||
int fingertipJointIndex = fingertipJointIndices.at(i);
|
int fingertipJointIndex = fingertipJointIndices.at(i);
|
||||||
setJointPosition(fingertipJointIndex, palm.getFingers()[fingerIndex].getTipPosition(),
|
glm::vec3 jointVector = extractTranslation(geometry.joints.at(fingertipJointIndex).bindTransform) -
|
||||||
fingerJointIndex, true, -palm.getNormal());
|
extractTranslation(geometry.joints.at(fingerJointIndex).bindTransform);
|
||||||
|
|
||||||
|
setJointRotation(fingerJointIndex, rotationBetween(palmRotation * jointVector, fingerVector) * palmRotation, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue