Top-down camera is now set relative to render camera
This commit is contained in:
parent
5c90e1ef07
commit
05d0680210
1 changed files with 9 additions and 4 deletions
|
@ -13,10 +13,6 @@ ModelerCameras::ModelerCameras(MainModelerWindow *parent):
|
||||||
current = new CameraDefinition();
|
current = new CameraDefinition();
|
||||||
active = render;
|
active = render;
|
||||||
|
|
||||||
topdown->strafeForward(-10.0);
|
|
||||||
topdown->strafeUp(25.0);
|
|
||||||
topdown->rotatePitch(-0.8);
|
|
||||||
|
|
||||||
// Watch GUI choice
|
// Watch GUI choice
|
||||||
QObject *widget = parent->findQmlObject("camera_choice");
|
QObject *widget = parent->findQmlObject("camera_choice");
|
||||||
connect(widget, SIGNAL(stateChanged(QString)), this, SLOT(changeActiveCamera(QString)));
|
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")
|
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;
|
active = topdown;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue