From 42357658567a32c5070934e4afde6dee2935611a Mon Sep 17 00:00:00 2001 From: Axel Wefers Date: Mon, 8 Jan 2018 14:19:30 -0800 Subject: [PATCH] glTF 2.0: Set camera "look at" to (0.0, 0.0, -1.0). --- code/glTF2Importer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/glTF2Importer.cpp b/code/glTF2Importer.cpp index 94e5ca3f1..c85fdbdee 100644 --- a/code/glTF2Importer.cpp +++ b/code/glTF2Importer.cpp @@ -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;