History

Changed mirror position to not be achored to the head.

But instead it's anchored to the "default" eye position, which is where the eyes are in the model, before IK or animations occur.

Anthony J. Thibault committed 11 years ago

Commit 044ea2a1 parent fa493421 file · +1 −1Browse files

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

Unified · Split

interface/src/Application.cpp+1−1
@@ -3381,7 +3381,7 @@ void Application::renderRearViewMirror(RenderArgs* renderArgs, const QRect& regi · 3380 unmodified lines
3381 // This was removed in commit 71e59cfa88c6563749594e25494102fe01db38e9 but could be further3381 // This was removed in commit 71e59cfa88c6563749594e25494102fe01db38e9 but could be further
3382 // investigated in order to adapt the technique while fixing the head rendering issue,3382 // investigated in order to adapt the technique while fixing the head rendering issue,
3383 // but the complexity of the hack suggests that a better approach3383 // but the complexity of the hack suggests that a better approach
3384 _mirrorCamera.setPosition(_myAvatar->getHead()->getEyePosition() +3384 _mirrorCamera.setPosition(_myAvatar->getDefaultEyePosition() +
3385 _myAvatar->getOrientation() * glm::vec3(0.0f, 0.0f, -1.0f) * MIRROR_REARVIEW_DISTANCE * _myAvatar->getScale());3385 _myAvatar->getOrientation() * glm::vec3(0.0f, 0.0f, -1.0f) * MIRROR_REARVIEW_DISTANCE * _myAvatar->getScale());
3386 }3386 }
3387 _mirrorCamera.setProjection(glm::perspective(glm::radians(fov), aspect, DEFAULT_NEAR_CLIP, DEFAULT_FAR_CLIP));3387 _mirrorCamera.setProjection(glm::perspective(glm::radians(fov), aspect, DEFAULT_NEAR_CLIP, DEFAULT_FAR_CLIP));