From 7dd70e7bca64391ebcc3a904344b9129677aaf7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Lemaire?= Date: Thu, 20 Aug 2015 19:02:11 +0200 Subject: [PATCH] Tweaked camera speed --- src/interface/modeler/quickapp/ModelerCameras.cpp | 2 +- src/interface/modeler/quickapp/OpenGLView.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/interface/modeler/quickapp/ModelerCameras.cpp b/src/interface/modeler/quickapp/ModelerCameras.cpp index b342595..9e2e769 100644 --- a/src/interface/modeler/quickapp/ModelerCameras.cpp +++ b/src/interface/modeler/quickapp/ModelerCameras.cpp @@ -56,7 +56,7 @@ void ModelerCameras::processPanning(double xvalue, double yvalue) void ModelerCameras::timerEvent(QTimerEvent *) { - current->transitionToAnother(active, 0.3); + current->transitionToAnother(active, 0.5); parent->getScenery()->keepCameraAboveGround(current); parent->getRenderer()->setCamera(current); } diff --git a/src/interface/modeler/quickapp/OpenGLView.cpp b/src/interface/modeler/quickapp/OpenGLView.cpp index 4233d84..cc828e6 100644 --- a/src/interface/modeler/quickapp/OpenGLView.cpp +++ b/src/interface/modeler/quickapp/OpenGLView.cpp @@ -65,7 +65,7 @@ void OpenGLView::wheelEvent(QWheelEvent *event) } double factor = getSpeedFactor(event); - window->getCamera()->processZoom(0.1 * factor * (double)event->angleDelta().y()); + window->getCamera()->processZoom(0.01 * factor * (double)event->angleDelta().y()); } void OpenGLView::mousePressEvent(QMouseEvent *event) @@ -100,11 +100,11 @@ void OpenGLView::mouseMoveEvent(QMouseEvent *event) QPointF diff = event->windowPos() - mouse_pos; if (mouse_button == Qt::LeftButton) { - window->getCamera()->processPanning(0.006 * factor * diff.x(), 0.002 * factor * diff.y()); + window->getCamera()->processPanning(0.002 * factor * diff.x(), 0.001 * factor * diff.y()); } else if (mouse_button == Qt::RightButton) { - window->getCamera()->processScroll(-0.1 * factor * diff.x(), 0.1 * factor * diff.y()); + window->getCamera()->processScroll(-0.02 * factor * diff.x(), 0.02 * factor * diff.y()); } mouse_pos = event->windowPos(); }