Explorar el Código

Object ignoreCollide

trethaller hace 7 años
padre
commit
2e8e98c891
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      h3d/scene/Object.hx

+ 2 - 0
h3d/scene/Object.hx

@@ -448,6 +448,8 @@ class Object implements hxd.impl.Serializable {
 		Same as getLocalCollider, but returns an absolute collider instead of a local one.
 		Same as getLocalCollider, but returns an absolute collider instead of a local one.
 	**/
 	**/
 	public function getGlobalCollider() : h3d.col.Collider {
 	public function getGlobalCollider() : h3d.col.Collider {
+		if(ignoreCollide)
+			return null;
 		var col = getLocalCollider();
 		var col = getLocalCollider();
 		return col == null ? null : new h3d.col.ObjectCollider(this, col);
 		return col == null ? null : new h3d.col.ObjectCollider(this, col);
 	}
 	}