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