瀏覽代碼

Object ignoreCollide

trethaller 7 年之前
父節點
當前提交
2e8e98c891
共有 1 個文件被更改,包括 2 次插入0 次删除
  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.
 	**/
 	public function getGlobalCollider() : h3d.col.Collider {
+		if(ignoreCollide)
+			return null;
 		var col = getLocalCollider();
 		return col == null ? null : new h3d.col.ObjectCollider(this, col);
 	}