Skip to content

Commit 59da72d

Browse files
authored
bugfix: apply FOV properly from JSON files and copy-paste (#389)
* fix(view): fetch fov from JSON files * fix: fly to the right FOV.
1 parent dcbaedb commit 59da72d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/view.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,7 +1070,7 @@ void setViewFromJson(std::string jsonData, bool flyTo) {
10701070
// NOTE: it's important that we do this after the mode/dir settings, as this
10711071
// lets us do our flight
10721072
bool viewChanged = false;
1073-
if (j.find("fov") == j.end()) {
1073+
if (j.find("fov") != j.end()) {
10741074
newFov = j["fov"];
10751075
viewChanged = true;
10761076
}
@@ -1088,7 +1088,7 @@ void setViewFromJson(std::string jsonData, bool flyTo) {
10881088
}
10891089
if (viewChanged) {
10901090
if (flyTo) {
1091-
startFlightTo(newViewMat, fov);
1091+
startFlightTo(newViewMat, newFov);
10921092
} else {
10931093
setCameraViewMatrix(newViewMat);
10941094
fov = newFov;

0 commit comments

Comments
 (0)