Showing the changes to interface/src/Application.cpp (1 of 4 files). Show all
Unified · Split
| @@ -151,6 +151,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 150 unmodified lines | ||
| 151 | 151 | _lastQueriedTime(usecTimestampNow()), |
| 152 | 152 | _mirrorViewRect(QRect(MIRROR_VIEW_LEFT_PADDING, MIRROR_VIEW_TOP_PADDING, MIRROR_VIEW_WIDTH, MIRROR_VIEW_HEIGHT)), |
| 153 | 153 | _cameraPushback(0.0f), |
| 154 | + _scaleMirror(1.0f), | |
| 154 | 155 | _mouseX(0), |
| 155 | 156 | _mouseY(0), |
| 156 | 157 | _lastMouseMove(usecTimestampNow()), |
| @@ -570,7 +571,7 @@ void Application::paintGL() { · 413 unmodified lines | ||
| 570 | 571 | _myCamera.setTightness(0.0f); |
| 571 | 572 | glm::vec3 eyePosition = _myAvatar->getHead()->calculateAverageEyePosition(); |
| 572 | 573 | float headHeight = eyePosition.y - _myAvatar->getPosition().y; |
| 573 | − _myCamera.setDistance(MIRROR_FULLSCREEN_DISTANCE * _myAvatar->getScale()); | |
| 574 | + _myCamera.setDistance(MIRROR_FULLSCREEN_DISTANCE * _myAvatar->getScale() * _scaleMirror); | |
| 574 | 575 | _myCamera.setTargetPosition(_myAvatar->getPosition() + glm::vec3(0, headHeight, 0)); |
| 575 | 576 | _myCamera.setTargetRotation(_myAvatar->getWorldAlignedOrientation() * glm::quat(glm::vec3(0.0f, PI, 0.0f))); |
| 576 | 577 | |
| @@ -868,11 +869,19 @@ void Application::keyPressEvent(QKeyEvent* event) { · 291 unmodified lines | ||
| 868 | 869 | break; |
| 869 | 870 | |
| 870 | 871 | case Qt::Key_Up: |
| 871 | − _myAvatar->setDriveKeys(isShifted ? UP : FWD, 1.f); | |
| 872 | + if (_myCamera.getMode() == CAMERA_MODE_MIRROR) { | |
| 873 | + _scaleMirror *= 0.95; | |
| 874 | + } else { | |
| 875 | + _myAvatar->setDriveKeys(isShifted ? UP : FWD, 1.f); | |
| 876 | + } | |
| 872 | 877 | break; |
| 873 | 878 | |
| 874 | 879 | case Qt::Key_Down: |
| 875 | − _myAvatar->setDriveKeys(isShifted ? DOWN : BACK, 1.f); | |
| 880 | + if (_myCamera.getMode() == CAMERA_MODE_MIRROR) { | |
| 881 | + _scaleMirror *= 1.05; | |
| 882 | + } else { | |
| 883 | + _myAvatar->setDriveKeys(isShifted ? DOWN : BACK, 1.f); | |
| 884 | + } | |
| 876 | 885 | break; |
| 877 | 886 | |
| 878 | 887 | case Qt::Key_Left: |