Browse Source

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

BearishSun 7 năm trước cách đây
mục cha
commit
3307100542

+ 4 - 0
Source/BansheeFBXImporter/BsFBXImporter.cpp

@@ -1581,6 +1581,10 @@ namespace bs
 
 
 			FbxAMatrix invLinkTransform = linkTransform.Inverse();
 			FbxAMatrix invLinkTransform = linkTransform.Inverse();
 			bone.localTfrm = bone.node->localTransform;
 			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);
 			bone.bindPose = FBXToNativeType(invLinkTransform);
 
 
 			// Apply global scale to bind pose (we only apply the scale to translation portion because we scale the
 			// Apply global scale to bind pose (we only apply the scale to translation portion because we scale the