From e658b5cd99c745fc339761673e1b673f8993b348 Mon Sep 17 00:00:00 2001 From: Mikulas Florek Date: Fri, 6 Dec 2024 14:20:28 +0100 Subject: [PATCH] fbx import - fixed light positions --- src/renderer/editor/fbx_importer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/renderer/editor/fbx_importer.cpp b/src/renderer/editor/fbx_importer.cpp index f453db7cf5..28345294c8 100644 --- a/src/renderer/editor/fbx_importer.cpp +++ b/src/renderer/editor/fbx_importer.cpp @@ -1033,7 +1033,9 @@ struct FBXImporter : ModelImporter { for (i32 i = 0, c = m_scene->getLightCount(); i < c; ++i) { const ofbx::Light* light = m_scene->getLight(i); const Matrix mtx = toLumix(light->getGlobalTransform()); - const DVec3 pos = DVec3(mtx.getTranslation() * meta.scene_scale * m_scene_scale); + Vec3 v = mtx.getTranslation() * meta.scene_scale * m_scene_scale; + v = fixOrientation(v); + const DVec3 pos = DVec3(v); m_lights.push(pos); } }