Просмотр исходного кода

Bugfix: Fixing scaled mesh rendering when animation is enabled but animation clip is not assigned

BearishSun 7 лет назад
Родитель
Сommit
3307100542
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      Source/BansheeFBXImporter/BsFBXImporter.cpp

+ 4 - 0
Source/BansheeFBXImporter/BsFBXImporter.cpp

@@ -1581,6 +1581,10 @@ namespace bs
 
 			FbxAMatrix invLinkTransform = linkTransform.Inverse();
 			bone.localTfrm = bone.node->localTransform;
+			bone.localTfrm[0][3] *= scene.scaleFactor;
+			bone.localTfrm[1][3] *= scene.scaleFactor;
+			bone.localTfrm[2][3] *= scene.scaleFactor;
+
 			bone.bindPose = FBXToNativeType(invLinkTransform);
 
 			// Apply global scale to bind pose (we only apply the scale to translation portion because we scale the