Showing the changes to interface/src/Application.cpp (1 of 1 file). Show all
Unified · Split
| @@ -2031,10 +2031,11 @@ void Application::updateAvatar(float deltaTime) { · 2030 unmodified lines | |||
| 2031 | _headMouseY = max(_headMouseY, 0); | 2031 | _headMouseY = max(_headMouseY, 0); |
| 2032 | _headMouseY = min(_headMouseY, _glWidget->height()); | 2032 | _headMouseY = min(_headMouseY, _glWidget->height()); |
| 2033 | 2033 | ||
| 2034 | // Set lookAtPosition if an avatar is at the center of the screen | 2034 | const float MIDPOINT_OF_SCREEN = 0.5; |
| 2035 | 2035 | ||
| 2036 | // Set lookAtPosition if an avatar is at the center of the screen | ||
| 2036 | glm::vec3 screenCenterRayOrigin, screenCenterRayDirection; | 2037 | glm::vec3 screenCenterRayOrigin, screenCenterRayDirection; |
| 2037 | _viewFrustum.computePickRay(0.5, 0.5, screenCenterRayOrigin, screenCenterRayDirection); | 2038 | _viewFrustum.computePickRay(MIDPOINT_OF_SCREEN, MIDPOINT_OF_SCREEN, screenCenterRayOrigin, screenCenterRayDirection); |
| 2038 | 2039 | ||
| 2039 | glm::vec3 eyePosition; | 2040 | glm::vec3 eyePosition; |
| 2040 | if (isLookingAtOtherAvatar(screenCenterRayOrigin, screenCenterRayDirection, eyePosition)) { | 2041 | if (isLookingAtOtherAvatar(screenCenterRayOrigin, screenCenterRayDirection, eyePosition)) { |