From 3e4c5f84ed16b5b8c6f59dc45fc5796df1dc3fb3 Mon Sep 17 00:00:00 2001 From: Andrzej Kapolka Date: Wed, 13 Nov 2013 13:26:36 -0800 Subject: [PATCH] Only rotate if we have at least three active fingers. --- interface/src/avatar/SkeletonModel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/interface/src/avatar/SkeletonModel.cpp b/interface/src/avatar/SkeletonModel.cpp index c42554becd..64288effc4 100644 --- a/interface/src/avatar/SkeletonModel.cpp +++ b/interface/src/avatar/SkeletonModel.cpp @@ -161,7 +161,8 @@ void SkeletonModel::applyPalmData(int jointIndex, const QVector& 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); }