Browse Source

fixup! Fix h3d.Scene.Skin.getBoundsRec not scaling correctly (#974) (#976)

Leonardo Jeanteur 4 years ago
parent
commit
9896d448b7
1 changed files with 2 additions and 1 deletions
  1. 2 1
      h3d/scene/Skin.hx

+ 2 - 1
h3d/scene/Skin.hx

@@ -94,6 +94,7 @@ class Skin extends MultiMaterial {
 		return s;
 	}
 
+	static var tmpVec = new h3d.Vector();
 	override function getBoundsRec( b : h3d.col.Bounds ) {
 		// ignore primitive bounds !
 		var old = primitive;
@@ -105,7 +106,7 @@ class Skin extends MultiMaterial {
 		syncJoints();
 		if( skinData.vertexWeights == null )
 			cast(primitive, h3d.prim.HMDModel).loadSkin(skinData);
-		var absScale = getAbsPos().getScale();
+		var absScale = getAbsPos().getScale(tmpVec);
 		var scale = Math.max(Math.max(absScale.x, absScale.y), absScale.z);
 		for( j in skinData.allJoints ) {
 			if( j.offsetRay < 0 ) continue;