mirror of
https://github.com/overte-org/overte.git
synced 2025-04-24 20:34:20 +02:00
Only rotate if we have at least three active fingers.
This commit is contained in:
parent
52a3071cb3
commit
3e4c5f84ed
1 changed files with 2 additions and 1 deletions
|
@ -161,7 +161,8 @@ void SkeletonModel::applyPalmData(int jointIndex, const QVector<int>& fingerJoin
|
|||
|
||||
// rotate palm according to average finger direction
|
||||
float directionLength = glm::length(direction);
|
||||
if (directionLength > EPSILON) {
|
||||
const int MIN_ROTATION_FINGERS = 3;
|
||||
if (directionLength > EPSILON && palm.getNumFingers() >= MIN_ROTATION_FINGERS) {
|
||||
applyRotationDelta(jointIndex, rotationBetween(palmRotation * glm::vec3(-sign, 0.0f, 0.0f), direction));
|
||||
getJointRotation(jointIndex, palmRotation, true);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue