From cea645dfc7fd5253712290349846c53ad709d0c2 Mon Sep 17 00:00:00 2001 From: Andrzej Kapolka Date: Tue, 10 Sep 2013 12:34:41 -0700 Subject: [PATCH] Tweak to blink angles. --- interface/src/avatar/Head.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/interface/src/avatar/Head.cpp b/interface/src/avatar/Head.cpp index 6a9f61b7d4..517d062494 100644 --- a/interface/src/avatar/Head.cpp +++ b/interface/src/avatar/Head.cpp @@ -723,9 +723,10 @@ void Head::renderEyeBalls() { glm::vec3 rotationAxis = glm::axis(leftIrisRotation); glRotatef(glm::angle(leftIrisRotation), rotationAxis.x, rotationAxis.y, rotationAxis.z); glScalef(_scale * EYELID_RADIUS, _scale * EYELID_RADIUS, _scale * EYELID_RADIUS); - glRotatef(-70 - 50 * _leftEyeBlink, 1, 0, 0); + float angle = -67.5f - 50.0f * _leftEyeBlink; + glRotatef(angle, 1, 0, 0); Application::getInstance()->getGeometryCache()->renderHemisphere(15, 10); - glRotatef(180 * _leftEyeBlink, 1, 0, 0); + glRotatef(glm::mix(-angle, 180.0f, _leftEyeBlink), 1, 0, 0); Application::getInstance()->getGeometryCache()->renderHemisphere(15, 10); } glPopMatrix(); @@ -736,9 +737,10 @@ void Head::renderEyeBalls() { glm::vec3 rotationAxis = glm::axis(rightIrisRotation); glRotatef(glm::angle(rightIrisRotation), rotationAxis.x, rotationAxis.y, rotationAxis.z); glScalef(_scale * EYELID_RADIUS, _scale * EYELID_RADIUS, _scale * EYELID_RADIUS); - glRotatef(-70 - 50 * _rightEyeBlink, 1, 0, 0); + float angle = -67.5f - 50.0f * _rightEyeBlink; + glRotatef(angle, 1, 0, 0); Application::getInstance()->getGeometryCache()->renderHemisphere(15, 10); - glRotatef(180 * _rightEyeBlink, 1, 0, 0); + glRotatef(glm::mix(-angle, 180.0f, _rightEyeBlink), 1, 0, 0); Application::getInstance()->getGeometryCache()->renderHemisphere(15, 10); } glPopMatrix();