From 3ff1f825a75a22b0a09a59841e12d9beee05b01f Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Tue, 15 Sep 2026 12:54:56 +0200 Subject: [PATCH] Revert partially #2147 to fix #4091 when imported as `fbx` --- Source/Engine/ContentImporters/ImportModel.cpp | 3 +++ Source/Engine/Tools/ModelTool/ModelTool.cpp | 2 ++ 2 files changed, 5 insertions(+) diff --git a/Source/Engine/ContentImporters/ImportModel.cpp b/Source/Engine/ContentImporters/ImportModel.cpp index b2a9434c9..315a5fcfe 100644 --- a/Source/Engine/ContentImporters/ImportModel.cpp +++ b/Source/Engine/ContentImporters/ImportModel.cpp @@ -794,7 +794,9 @@ CreateAssetResult ImportModel::CreatePrefab(CreateAssetContext& context, const M // Setup node in hierarchy nodeToActor.Add(nodeIndex, nodeActor); nodeActor->SetName(node.Name); + nodeActor->SetLocalTransform(node.LocalTransform); +#if 0 // When use local origin is checked, it shifts everything over the same amount, including the root. This tries to work around that. if (!(nodeIndex == 0 && options.UseLocalOrigin)) { @@ -829,6 +831,7 @@ CreateAssetResult ImportModel::CreatePrefab(CreateAssetContext& context, const M nodeActor->SetLocalTransform(positionOffset); } +#endif if (nodeIndex == 0) { diff --git a/Source/Engine/Tools/ModelTool/ModelTool.cpp b/Source/Engine/Tools/ModelTool/ModelTool.cpp index e06e1aa03..715a3fcc7 100644 --- a/Source/Engine/Tools/ModelTool/ModelTool.cpp +++ b/Source/Engine/Tools/ModelTool/ModelTool.cpp @@ -1631,6 +1631,7 @@ bool ModelTool::ImportModel(const String& path, ModelData& data, Options& option } } } +#if 0 if (EnumHasAnyFlags(options.ImportTypes, ImportDataTypes::Geometry) && options.Type == ModelType::Prefab) { // Apply just the scale and rotations. @@ -1663,6 +1664,7 @@ bool ModelTool::ImportModel(const String& path, ModelData& data, Options& option } } } +#endif if (EnumHasAnyFlags(options.ImportTypes, ImportDataTypes::Animations)) { for (auto& animation : data.Animations)