glTF 2.0: Set camera "look at" to (0.0, 0.0, -1.0).

pull/1690/head
Axel Wefers 2018-01-08 14:19:30 -08:00
parent 89a62edb9a
commit 4235765856
1 changed files with 3 additions and 0 deletions

View File

@ -499,6 +499,9 @@ void glTF2Importer::ImportCameras(glTF2::Asset& r)
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) {
aicam->mAspect = cam.cameraProperties.perspective.aspectRatio;