From 2c2f2fad5a45c3311c04c9c7ad151d369b893bd6 Mon Sep 17 00:00:00 2001 From: Andrzej Kapolka Date: Wed, 4 Sep 2013 10:53:07 -0700 Subject: [PATCH] Lookat adjustment. --- interface/src/Application.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 80e4995c61..7756ddeb32 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -1525,21 +1525,21 @@ void Application::update(float deltaTime) { float averagePitch = (_faceshift.getEyeGazeLeftPitch() + _faceshift.getEyeGazeRightPitch()) / 2.0f; float averageYaw = (_faceshift.getEyeGazeLeftYaw() + _faceshift.getEyeGazeRightYaw()) / 2.0f; lookAtRayDirection = _myAvatar.getHead().getOrientation() * - glm::quat(glm::vec3(averagePitch, averageYaw, 0.0f)) * glm::vec3(0.0f, 0.0f, -1.0f); + glm::quat(glm::radians(glm::vec3(averagePitch, averageYaw, 0.0f))) * glm::vec3(0.0f, 0.0f, -1.0f); } _isLookingAtOtherAvatar = isLookingAtOtherAvatar(lookAtRayOrigin, lookAtRayDirection, lookAtSpot); if (_isLookingAtOtherAvatar) { // If the mouse is over another avatar's head... _myAvatar.getHead().setLookAtPosition(lookAtSpot); - } else if (_isHoverVoxel) { + } else if (_isHoverVoxel && !_faceshift.isActive()) { // Look at the hovered voxel lookAtSpot = getMouseVoxelWorldCoordinates(_hoverVoxel); _myAvatar.getHead().setLookAtPosition(lookAtSpot); } else { // Just look in direction of the mouse ray const float FAR_AWAY_STARE = TREE_SCALE; - lookAtSpot = mouseRayOrigin + mouseRayDirection * FAR_AWAY_STARE; + lookAtSpot = lookAtRayOrigin + lookAtRayDirection * FAR_AWAY_STARE; _myAvatar.getHead().setLookAtPosition(lookAtSpot); }