From 05d068021083217dc951ffd5068a9ead215d0d66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Lemaire?= Date: Thu, 20 Aug 2015 01:30:46 +0200 Subject: [PATCH] Top-down camera is now set relative to render camera --- src/interface/modeler/quickapp/ModelerCameras.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/interface/modeler/quickapp/ModelerCameras.cpp b/src/interface/modeler/quickapp/ModelerCameras.cpp index c6ae5c3..b342595 100644 --- a/src/interface/modeler/quickapp/ModelerCameras.cpp +++ b/src/interface/modeler/quickapp/ModelerCameras.cpp @@ -13,10 +13,6 @@ ModelerCameras::ModelerCameras(MainModelerWindow *parent): current = new CameraDefinition(); active = render; - topdown->strafeForward(-10.0); - topdown->strafeUp(25.0); - topdown->rotatePitch(-0.8); - // Watch GUI choice QObject *widget = parent->findQmlObject("camera_choice"); connect(widget, SIGNAL(stateChanged(QString)), this, SLOT(changeActiveCamera(QString))); @@ -85,6 +81,15 @@ void ModelerCameras::changeActiveCamera(const QString &name) } else if (name == "Top-down camera") { + topdown->setLocation(render->getLocation()); + topdown->setTarget(render->getTarget()); + + topdown->strafeForward(-10.0); + topdown->strafeUp(25.0); + topdown->rotatePitch(-0.8); + + topdown->validate(); + active = topdown; } }