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
19331933 // If the mouse is over another avatar's head...
19341934 glm::vec3 myLookAtFromMouse(eyePosition);
19351935 _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);
19361940 } else {
1941+ // Just look in direction of the mouse ray
19371942 glm::vec3 myLookAtFromMouse(mouseRayOrigin + mouseRayDirection);
19381943 _myAvatar.getHead().setLookAtPosition(myLookAtFromMouse);
19391944 }

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