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

FBX import: Fixing an issue with the application of global scale and multi-mesh models

BearishSun пре 9 година
родитељ
комит
e3836cb113
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      Source/BansheeFBXImporter/Source/BsFBXImporter.cpp

+ 2 - 2
Source/BansheeFBXImporter/Source/BsFBXImporter.cpp

@@ -359,7 +359,7 @@ namespace bs
 
 			for (auto& node : mesh->referencedBy)
 			{
-				Matrix4 worldTransform = node->worldTransform * scene.globalScale;
+				Matrix4 worldTransform = scene.globalScale * node->worldTransform;
 				Matrix4 worldTransformIT = worldTransform.inverse();
 				worldTransformIT = worldTransformIT.transpose();
 
@@ -891,7 +891,7 @@ namespace bs
 			UINT32 numIndices = (UINT32)mesh->indices.size();
 			for (auto& node : mesh->referencedBy)
 			{
-				Matrix4 worldTransform = node->worldTransform * scene.globalScale;
+				Matrix4 worldTransform = scene.globalScale * node->worldTransform;
 				Matrix4 worldTransformIT = worldTransform.inverse();
 				worldTransformIT = worldTransformIT.transpose();