Fix anchor-and-aim related errors

This commit is contained in:
Emil Axelsson
2019-03-04 22:59:06 +01:00
parent b5eb41e27f
commit 6b28bac054
2 changed files with 9 additions and 2 deletions

View File

@@ -645,6 +645,8 @@ void OpenSpaceEngine::loadSingleAsset(const std::string& assetPath) {
}
_scene = std::make_unique<Scene>(std::move(sceneInitializer));
global::renderEngine.setScene(_scene.get());
global::rootPropertyOwner.addPropertySubOwner(_scene.get());
_scene->setCamera(std::make_unique<Camera>());
Camera* camera = _scene->camera();
@@ -661,8 +663,6 @@ void OpenSpaceEngine::loadSingleAsset(const std::string& assetPath) {
);
}
global::renderEngine.setScene(_scene.get());
_assetManager->removeAll();
_assetManager->add(assetPath);