diff --git a/include/openspace/util/camera.h b/include/openspace/util/camera.h index 899adc3a27..48f7ae01e9 100644 --- a/include/openspace/util/camera.h +++ b/include/openspace/util/camera.h @@ -113,6 +113,8 @@ namespace openspace { // @TODO this should simply be called viewMatrix! // Or it needs to be changed so that it actually is combined. Right now it is // only the view matrix that is the same for all SGCT cameras. + // Right now this function returns the actual combined matrix which makes some + // of the old calls to the function wrong.. const Mat4& combinedViewMatrix() const; // Synchronization diff --git a/src/util/camera.cpp b/src/util/camera.cpp index 1444f7ddf0..b249d4cf7d 100644 --- a/src/util/camera.cpp +++ b/src/util/camera.cpp @@ -156,7 +156,9 @@ namespace openspace { Mat4 cameraTranslation = glm::inverse(glm::translate(Mat4(1.0), _position.shared)); _cachedCombinedViewMatrix.datum = - Mat4(viewRotationMatrix()) * cameraTranslation; + Mat4(sgctInternal.viewMatrix()) * + Mat4(viewRotationMatrix()) * + cameraTranslation; } return _cachedCombinedViewMatrix.datum; }