diff --git a/interface/src/renderer/Model.cpp b/interface/src/renderer/Model.cpp index 626b66ed99..a345a32707 100644 --- a/interface/src/renderer/Model.cpp +++ b/interface/src/renderer/Model.cpp @@ -2112,26 +2112,6 @@ void JointState::clearTransformTranslation() { _transformInModelFrame[3][2] = 0.0f; } -void JointState::applyRotationDelta(const glm::quat& delta, bool constrain, float priority) { - assert(_fbxJoint != NULL); - if (priority < _animationPriority) { - return; - } - _animationPriority = priority; - if (!constrain || (_fbxJoint->rotationMin == glm::vec3(-PI, -PI, -PI) && - _fbxJoint->rotationMax == glm::vec3(PI, PI, PI))) { - // no constraints - _rotation = _rotation * glm::inverse(_combinedRotation) * delta * _combinedRotation; - _combinedRotation = delta * _combinedRotation; - return; - } - glm::quat targetRotation = delta * _combinedRotation; - glm::vec3 eulers = safeEulerAngles(_rotation * glm::inverse(_combinedRotation) * targetRotation); - glm::quat newRotation = glm::quat(glm::clamp(eulers, _fbxJoint->rotationMin, _fbxJoint->rotationMax)); - _combinedRotation = _combinedRotation * glm::inverse(_rotation) * newRotation; - _rotation = newRotation; -} - void JointState::applyRotationDeltaInModelFrame(const glm::quat& delta, bool constrain, float priority) { assert(_fbxJoint != NULL); if (priority < _animationPriority) { diff --git a/interface/src/renderer/Model.h b/interface/src/renderer/Model.h index 7e4f60816b..eb5b4cd7c8 100644 --- a/interface/src/renderer/Model.h +++ b/interface/src/renderer/Model.h @@ -55,7 +55,6 @@ public: /// \return rotation from bind to model frame glm::quat getRotationFromBindToModelFrame() const; - void applyRotationDelta(const glm::quat& delta, bool constrain = true, float priority = 1.0f); void applyRotationDeltaInModelFrame(const glm::quat& delta, bool constrain = true, float priority = 1.0f); const glm::vec3& getDefaultTranslationInParentFrame() const;