Browse Source

Fixed negative scale factors in gltf models.

Mark Sibly 7 years ago
parent
commit
99f4d15a5c
1 changed files with 3 additions and 0 deletions
  1. 3 0
      modules/mojo3d/loader/gltf2.monkey2

+ 3 - 0
modules/mojo3d/loader/gltf2.monkey2

@@ -624,6 +624,9 @@ Class Gltf2Asset
 			
 			
 			If jnode.Contains( "scale" )
 			If jnode.Contains( "scale" )
 				node.scale=GetVec3f( jnode.GetArray( "scale" ) )
 				node.scale=GetVec3f( jnode.GetArray( "scale" ) )
+				node.scale.x=Abs( node.scale.x )
+				node.scale.y=Abs( node.scale.y )
+				node.scale.z=Abs( node.scale.z )
 			Endif
 			Endif
 				
 				
 			If jnode.Contains( "matrix" )
 			If jnode.Contains( "matrix" )