As a temporary measure, restore the full screen mirror as a menu option.
Showing the changes to interface/src/Application.cpp (1 of 3 files). Show all
Unified · Split
| @@ -382,6 +382,20 @@ void Application::paintGL() { · 381 unmodified lines | ||
| 382 | 382 | } else if (_myCamera.getMode() == CAMERA_MODE_THIRD_PERSON) { |
| 383 | 383 | _myCamera.setTargetPosition(_myAvatar.getUprightHeadPosition()); |
| 384 | 384 | _myCamera.setTargetRotation(_myAvatar.getHead().getCameraOrientation()); |
| 385 | + | |
| 386 | + } else if (_myCamera.getMode() == CAMERA_MODE_MIRROR) { | |
| 387 | + _myCamera.setTightness(0.0f); | |
| 388 | + _myCamera.setDistance(0.3f); | |
| 389 | + glm::vec3 targetPosition = _myAvatar.getUprightHeadPosition(); | |
| 390 | + if (_myAvatar.getHead().getBlendFace().isActive()) { | |
| 391 | + // make sure we're aligned to the blend face eyes | |
| 392 | + glm::vec3 leftEyePosition, rightEyePosition; | |
| 393 | + if (_myAvatar.getHead().getBlendFace().getEyePositions(leftEyePosition, rightEyePosition, true)) { | |
| 394 | + targetPosition = (leftEyePosition + rightEyePosition) * 0.5f; | |
| 395 | + } | |
| 396 | + } | |
| 397 | + _myCamera.setTargetPosition(targetPosition); | |
| 398 | + _myCamera.setTargetRotation(_myAvatar.getWorldAlignedOrientation() * glm::quat(glm::vec3(0.0f, PIf, 0.0f))); | |
| 385 | 399 | } |
| 386 | 400 | |
| 387 | 401 | // Update camera position |
| @@ -885,7 +899,11 @@ void Application::keyPressEvent(QKeyEvent* event) { · 497 unmodified lines | ||
| 885 | 899 | updateProjectionMatrix(); |
| 886 | 900 | break; |
| 887 | 901 | case Qt::Key_H: |
| 888 | − Menu::getInstance()->triggerOption(MenuOption::Mirror); | |
| 902 | + if (isShifted) { | |
| 903 | + Menu::getInstance()->triggerOption(MenuOption::Mirror); | |
| 904 | + } else { | |
| 905 | + Menu::getInstance()->triggerOption(MenuOption::FullscreenMirror); | |
| 906 | + } | |
| 889 | 907 | break; |
| 890 | 908 | case Qt::Key_F: |
| 891 | 909 | if (isShifted) { |
| @@ -2127,7 +2145,12 @@ void Application::update(float deltaTime) { · 1235 unmodified lines | ||
| 2127 | 2145 | } |
| 2128 | 2146 | |
| 2129 | 2147 | if (!OculusManager::isConnected()) { |
| 2130 | − if (Menu::getInstance()->isOptionChecked(MenuOption::FirstPerson)) { | |
| 2148 | + if (Menu::getInstance()->isOptionChecked(MenuOption::FullscreenMirror)) { | |
| 2149 | + if (_myCamera.getMode() != CAMERA_MODE_MIRROR) { | |
| 2150 | + _myCamera.setMode(CAMERA_MODE_MIRROR); | |
| 2151 | + _myCamera.setModeShiftRate(100.0f); | |
| 2152 | + } | |
| 2153 | + } else if (Menu::getInstance()->isOptionChecked(MenuOption::FirstPerson)) { | |
| 2131 | 2154 | if (_myCamera.getMode() != CAMERA_MODE_FIRST_PERSON) { |
| 2132 | 2155 | _myCamera.setMode(CAMERA_MODE_FIRST_PERSON); |
| 2133 | 2156 | _myCamera.setModeShiftRate(1.0f); |