diff --git a/apps/opencs/view/render/cameracontroller.cpp b/apps/opencs/view/render/cameracontroller.cpp index 74f72938f..c70f87565 100644 --- a/apps/opencs/view/render/cameracontroller.cpp +++ b/apps/opencs/view/render/cameracontroller.cpp @@ -409,11 +409,8 @@ namespace CSVRender { static const int DefaultStartDistance = 10000.f; - osg::Quat rotation = getCamera()->getViewMatrix().getRotate(); - osg::Vec3d position = getCamera()->getViewMatrix().getTrans(); - osg::Vec3d offset = rotation * (LocalForward * DefaultStartDistance); - - mCenter = position + offset; + osg::Vec3d eye, up; + getCamera()->getViewMatrixAsLookAt(eye, mCenter, up, DefaultStartDistance); mInitialized = true; }