Showing the changes to interface/src/Application.cpp (1 of 1 file). Show all
Unified · Split
| @@ -966,12 +966,14 @@ void Application::paintGL() { · 965 unmodified lines | ||
| 966 | 966 | // Always use the default eye position, not the actual head eye position. |
| 967 | 967 | // Using the latter will cause the camera to wobble with idle animations, |
| 968 | 968 | // or with changes from the face tracker |
| 969 | − _myCamera.setPosition(_myAvatar->getDefaultEyePosition()); | |
| 969 | + | |
| 970 | 970 | if (!getActiveDisplayPlugin()->isHmd()) { |
| 971 | − // If not using an HMD, grab the camera orientation directly | |
| 971 | + _myCamera.setPosition(_myAvatar->getDefaultEyePosition()); | |
| 972 | 972 | _myCamera.setRotation(_myAvatar->getHead()->getCameraOrientation()); |
| 973 | 973 | } else { |
| 974 | − _myCamera.setRotation(glm::quat_cast(_myAvatar->getSensorToWorldMatrix() * getHMDSensorPose())); | |
| 974 | + auto camMat = _myAvatar->getSensorToWorldMatrix() * getHMDSensorPose(); | |
| 975 | + _myCamera.setPosition(extractTranslation(camMat)); | |
| 976 | + _myCamera.setRotation(glm::quat_cast(camMat)); | |
| 975 | 977 | } |
| 976 | 978 | } else if (_myCamera.getMode() == CAMERA_MODE_THIRD_PERSON) { |
| 977 | 979 | if (isHMDMode()) { |
| @@ -3729,7 +3731,7 @@ void Application::displaySide(RenderArgs* renderArgs, Camera& theCamera, bool se · 2751 unmodified lines | ||
| 3729 | 3731 | } |
| 3730 | 3732 | renderArgs->_debugFlags = renderDebugFlags; |
| 3731 | 3733 | _entities.render(renderArgs); |
| 3732 | − ViveControllerManager::getInstance().render(renderArgs); | |
| 3734 | + ViveControllerManager::getInstance().updateRendering(renderArgs, _main3DScene, pendingChanges); | |
| 3733 | 3735 | } |
| 3734 | 3736 | |
| 3735 | 3737 | // render the ambient occlusion effect if enabled |