mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-11 22:20:23 -06:00
Fix navigation state not loading correctly from profile (closes #2143)
Note that the anchor should be used as a reference frame per default. Also, it should always be used, if possible. We have quite some problems when using other reference frames PR: #2175
This commit is contained in:
@@ -1715,8 +1715,11 @@ void setCameraFromProfile(const Profile& p) {
|
||||
if (navStateProfile.aim.has_value()) {
|
||||
nav.aim = navStateProfile.aim.value();
|
||||
}
|
||||
if (nav.referenceFrame.empty()) {
|
||||
nav.referenceFrame = "Root";
|
||||
if (navStateProfile.referenceFrame.empty()) {
|
||||
nav.referenceFrame = nav.anchor;
|
||||
}
|
||||
else {
|
||||
nav.referenceFrame = navStateProfile.referenceFrame;
|
||||
}
|
||||
nav.position = navStateProfile.position;
|
||||
if (navStateProfile.up.has_value()) {
|
||||
|
||||
Reference in New Issue
Block a user