Showing the changes to interface/src/Application.cpp (1 of 5 files). Show all
Unified · Split
| @@ -332,7 +332,15 @@ void Application::paintGL() { · 331 unmodified lines | ||
| 332 | 332 | |
| 333 | 333 | if (_myCamera.getMode() == CAMERA_MODE_MIRROR) { |
| 334 | 334 | _myCamera.setTightness (100.0f); |
| 335 | − _myCamera.setTargetPosition(_myAvatar.getUprightHeadPosition()); | |
| 335 | + glm::vec3 targetPosition = _myAvatar.getUprightHeadPosition(); | |
| 336 | + if (_myAvatar.getHead().getBlendFace().isActive()) { | |
| 337 | + // make sure we're aligned to the blend face eyes | |
| 338 | + glm::vec3 leftEyePosition, rightEyePosition; | |
| 339 | + if (_myAvatar.getHead().getBlendFace().getEyePositions(leftEyePosition, rightEyePosition, true)) { | |
| 340 | + targetPosition = (leftEyePosition + rightEyePosition) * 0.5f; | |
| 341 | + } | |
| 342 | + } | |
| 343 | + _myCamera.setTargetPosition(targetPosition); | |
| 336 | 344 | _myCamera.setTargetRotation(_myAvatar.getWorldAlignedOrientation() * glm::quat(glm::vec3(0.0f, PIf, 0.0f))); |
| 337 | 345 | |
| 338 | 346 | } else if (OculusManager::isConnected()) { |