Преглед изворни кода

Merge branch 'master' into issue_1691

Kim Kulling пре 7 година
родитељ
комит
45d5f2eec8
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      code/glTF2Importer.cpp

+ 3 - 0
code/glTF2Importer.cpp

@@ -512,6 +512,9 @@ void glTF2Importer::ImportCameras(glTF2::Asset& r)
 
 
         aiCamera* aicam = mScene->mCameras[i] = new aiCamera();
         aiCamera* aicam = mScene->mCameras[i] = new aiCamera();
 
 
+        // cameras point in -Z by default, rest is specified in node transform
+        aicam->mLookAt = aiVector3D(0.f,0.f,-1.f);
+
         if (cam.type == Camera::Perspective) {
         if (cam.type == Camera::Perspective) {
 
 
             aicam->mAspect        = cam.cameraProperties.perspective.aspectRatio;
             aicam->mAspect        = cam.cameraProperties.perspective.aspectRatio;