History

Set lookAt to hovered voxel

Philip Rosedale committed 13 years ago

Commit 4af92d41 parent 0b101691 file · +5 −0Browse files

Showing the changes to interface/src/Application.cpp (1 of 1 file). Show all

Unified · Split

interface/src/Application.cpp+5−0
@@ -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 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t