Showing the changes to interface/src/Application.cpp (1 of 1 file). Show all
Unified · Split
| @@ -1933,7 +1933,12 @@ void Application::update(float deltaTime) { · 1932 unmodified lines | |||
| 1933 | // If the mouse is over another avatar's head... | 1933 | // If the mouse is over another avatar's head... |
| 1934 | glm::vec3 myLookAtFromMouse(eyePosition); | 1934 | glm::vec3 myLookAtFromMouse(eyePosition); |
| 1935 | _myAvatar.getHead().setLookAtPosition(myLookAtFromMouse); | 1935 | _myAvatar.getHead().setLookAtPosition(myLookAtFromMouse); |
| 1936 | } else if (_isHoverVoxel) { | ||
| 1937 | // Look at the hovered voxel | ||
| 1938 | glm::vec3 lookAtSpot = getMouseVoxelWorldCoordinates(_hoverVoxel); | ||
| 1939 | _myAvatar.getHead().setLookAtPosition(lookAtSpot); | ||
| 1936 | } else { | 1940 | } else { |
| 1941 | // Just look in direction of the mouse ray | ||
| 1937 | glm::vec3 myLookAtFromMouse(mouseRayOrigin + mouseRayDirection); | 1942 | glm::vec3 myLookAtFromMouse(mouseRayOrigin + mouseRayDirection); |
| 1938 | _myAvatar.getHead().setLookAtPosition(myLookAtFromMouse); | 1943 | _myAvatar.getHead().setLookAtPosition(myLookAtFromMouse); |
| 1939 | } | 1944 | } |