Browse Source

Box debug rendering

trethaller 7 years ago
parent
commit
7a5c5a7004
1 changed files with 4 additions and 1 deletions
  1. 4 1
      hide/prefab/Box.hx

+ 4 - 1
hide/prefab/Box.hx

@@ -21,13 +21,16 @@ class Box extends Object3D {
 		var prim = h3d.prim.Cube.defaultUnitCube();
 		var mesh = new h3d.scene.Mesh(prim, obj);
 		mesh.setPosition(-0.5, -0.5, -0.5);
+
+		#if editor
 		setDebugColor(0x60ff00ff, mesh.material);
 
 		var wire = new h3d.scene.Box(obj);
 		wire.color = 0;
 		wire.ignoreCollide = true;
 		wire.material.shadows = false;
-
+		#end
+		
 		ctx.local3d = obj;
 		ctx.local3d.name = name;
 		applyPos(ctx.local3d);