From b246580c6389bfe2786804ff454884b3e426e929 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20=C4=8C=C3=AD=C5=BE?= Date: Wed, 13 Dec 2017 20:08:38 +0100 Subject: [PATCH] Fix orbit camera axis --- apps/opencs/view/render/cameracontroller.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/apps/opencs/view/render/cameracontroller.cpp b/apps/opencs/view/render/cameracontroller.cpp index ca80ed34fe..57032f5adc 100644 --- a/apps/opencs/view/render/cameracontroller.cpp +++ b/apps/opencs/view/render/cameracontroller.cpp @@ -697,11 +697,7 @@ namespace CSVRender osg::Vec3d absoluteUp = osg::Vec3(0,0,1); osg::Vec3d forward = center - eye; - - osg::Vec3d axis = absoluteUp ^ forward; - - if (mConstRoll && up.z() < 0.0) - axis *= -1.0; + osg::Vec3d axis = up ^ forward; osg::Quat rotation = osg::Quat(value,axis); osg::Vec3d oldOffset = eye - mCenter;