diff --git a/interface/src/avatar/MyAvatar.cpp b/interface/src/avatar/MyAvatar.cpp index 7196aa1a2c..21a05576fd 100755 --- a/interface/src/avatar/MyAvatar.cpp +++ b/interface/src/avatar/MyAvatar.cpp @@ -807,46 +807,6 @@ void MyAvatar::simulate(float deltaTime) { // before we perform rig animations and IK. updateSensorToWorldMatrix(); - // if we detect the hand controller is at rest, i.e. lying on the table, or the hand is too far away from the hmd - // disable the associated hand controller input. - { - // NOTE: all poses are in sensor space. - auto leftHandIter = _controllerPoseMap.find(controller::Action::LEFT_HAND); - if (leftHandIter != _controllerPoseMap.end() && leftHandIter->second.isValid()) { - _leftHandAtRestDetector.update(leftHandIter->second.getTranslation(), leftHandIter->second.getRotation()); - if (_leftHandAtRestDetector.isAtRest()) { - leftHandIter->second.valid = false; - } - } else { - _leftHandAtRestDetector.invalidate(); - } - - auto rightHandIter = _controllerPoseMap.find(controller::Action::RIGHT_HAND); - if (rightHandIter != _controllerPoseMap.end() && rightHandIter->second.isValid()) { - _rightHandAtRestDetector.update(rightHandIter->second.getTranslation(), rightHandIter->second.getRotation()); - if (_rightHandAtRestDetector.isAtRest()) { - rightHandIter->second.valid = false; - } - } else { - _rightHandAtRestDetector.invalidate(); - } - - auto headIter = _controllerPoseMap.find(controller::Action::HEAD); - - // The 99th percentile man has a spine to fingertip to height ratio of 0.45. Lets increase that by about 10% to 0.5 - // then measure the distance the center of the eyes to the finger tips. To come up with this ratio. - // From "The Measure of Man and Woman: Human Factors in Design, Revised Edition" by Alvin R. Tilley, Henry Dreyfuss Associates - const float MAX_HEAD_TO_HAND_DISTANCE_RATIO = 0.52f; - - float maxHeadHandDistance = getUserHeight() * MAX_HEAD_TO_HAND_DISTANCE_RATIO; - if (glm::length(headIter->second.getTranslation() - leftHandIter->second.getTranslation()) > maxHeadHandDistance) { - leftHandIter->second.valid = false; - } - if (glm::length(headIter->second.getTranslation() - rightHandIter->second.getTranslation()) > maxHeadHandDistance) { - rightHandIter->second.valid = false; - } - } - { PerformanceTimer perfTimer("skeleton");