mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-07 15:10:47 +02:00
Set lookAt to hovered voxel
This commit is contained in:
parent
0b10169915
commit
4af92d46f3
1 changed files with 5 additions and 0 deletions
|
@ -1933,7 +1933,12 @@ void Application::update(float deltaTime) {
|
|||
// If the mouse is over another avatar's head...
|
||||
glm::vec3 myLookAtFromMouse(eyePosition);
|
||||
_myAvatar.getHead().setLookAtPosition(myLookAtFromMouse);
|
||||
} else if (_isHoverVoxel) {
|
||||
// Look at the hovered voxel
|
||||
glm::vec3 lookAtSpot = getMouseVoxelWorldCoordinates(_hoverVoxel);
|
||||
_myAvatar.getHead().setLookAtPosition(lookAtSpot);
|
||||
} else {
|
||||
// Just look in direction of the mouse ray
|
||||
glm::vec3 myLookAtFromMouse(mouseRayOrigin + mouseRayDirection);
|
||||
_myAvatar.getHead().setLookAtPosition(myLookAtFromMouse);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue