浏览代码

Merge branch 'master' into master

Kim Kulling 5 年之前
父节点
当前提交
1473c6616b
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      code/glTF2/glTF2Importer.cpp

+ 5 - 0
code/glTF2/glTF2Importer.cpp

@@ -925,6 +925,11 @@ aiNode *ImportNode(aiScene *pScene, glTF2::Asset &r, std::vector<unsigned int> &
 
 	if (node.camera) {
 		pScene->mCameras[node.camera.GetIndex()]->mName = ainode->mName;
+		if (node.translation.isPresent) {
+			aiVector3D trans;
+			CopyValue(node.translation.value, trans);
+			pScene->mCameras[node.camera.GetIndex()]->mPosition = trans;
+		}
 	}
 
 	if (node.light) {