Browse Source

Implemented dimension for TransformCollider

Clément Espeute 1 year ago
parent
commit
117695af7c
1 changed files with 3 additions and 2 deletions
  1. 3 2
      h3d/col/TransformCollider.hx

+ 3 - 2
h3d/col/TransformCollider.hx

@@ -79,8 +79,9 @@ class TransformCollider extends Collider {
 	}
 
 	public function dimension() {
-		throw "Not implemented";
-		return 0.0;
+		var scale = mat.getScale();
+		var scaleMax = Math.max(scale.x, Math.max(scale.y, scale.z));
+		return collider.dimension() * scaleMax;
 	}
 
 	#if !macro