mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 14:03:55 +02:00
Read the palm direction from the FST, use that to determine Leap rotations.
This commit is contained in:
parent
3446337cc5
commit
0eaaa89c9a
3 changed files with 5 additions and 1 deletions
|
@ -141,7 +141,7 @@ void SkeletonModel::applyPalmData(int jointIndex, const QVector<int>& fingerJoin
|
|||
float sign = (jointIndex == geometry.rightHandJointIndex) ? 1.0f : -1.0f;
|
||||
glm::quat palmRotation;
|
||||
getJointRotation(jointIndex, palmRotation, true);
|
||||
palmRotation = rotationBetween(palmRotation * IDENTITY_UP, -palm.getNormal()) * palmRotation;
|
||||
palmRotation = rotationBetween(palmRotation * geometry.palmDirection, palm.getNormal()) * palmRotation;
|
||||
|
||||
// sort the finger indices by raw x, get the average direction
|
||||
QVector<IndexValue> fingerIndices;
|
||||
|
|
|
@ -1327,6 +1327,8 @@ FBXGeometry extractFBXGeometry(const FBXNode& node, const QVariantHash& mapping)
|
|||
geometry.meshes.append(extracted.mesh);
|
||||
}
|
||||
|
||||
geometry.palmDirection = parseVec3(mapping.value("palmDirection", "0, -1, 0").toString());
|
||||
|
||||
// process attachments
|
||||
QVariantHash attachments = mapping.value("attach").toHash();
|
||||
for (QVariantHash::const_iterator it = attachments.constBegin(); it != attachments.constEnd(); it++) {
|
||||
|
|
|
@ -145,6 +145,8 @@ public:
|
|||
QVector<int> leftFingertipJointIndices;
|
||||
QVector<int> rightFingertipJointIndices;
|
||||
|
||||
glm::vec3 palmDirection;
|
||||
|
||||
glm::vec3 neckPivot;
|
||||
|
||||
QVector<FBXAttachment> attachments;
|
||||
|
|
Loading…
Reference in a new issue