From 9749e5edd6c2dc038fb3e38c0717d8da8d17b56c Mon Sep 17 00:00:00 2001 From: Mark Peng Date: Thu, 11 Jul 2013 10:53:38 -0700 Subject: [PATCH] Add const var to represent magic num in eyecontact code when gyros are on. --- interface/src/Application.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index b7ed7a45ae..57109b7cad 100755 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2021,10 +2021,11 @@ void Application::updateAvatar(float deltaTime) { _headMouseY = max(_headMouseY, 0); _headMouseY = min(_headMouseY, _glWidget->height()); - // Set lookAtPosition if an avatar is at the center of the screen + const float MIDPOINT_OF_SCREEN = 0.5; + // Set lookAtPosition if an avatar is at the center of the screen glm::vec3 screenCenterRayOrigin, screenCenterRayDirection; - _viewFrustum.computePickRay(0.5, 0.5, screenCenterRayOrigin, screenCenterRayDirection); + _viewFrustum.computePickRay(MIDPOINT_OF_SCREEN, MIDPOINT_OF_SCREEN, screenCenterRayOrigin, screenCenterRayDirection); glm::vec3 eyePosition; if (isLookingAtOtherAvatar(screenCenterRayOrigin, screenCenterRayDirection, eyePosition)) {