优化collision

This commit is contained in:
YHH
2020-06-15 08:46:38 +08:00
parent 246e9a9511
commit 7f8f1cf0d0
8 changed files with 132 additions and 7 deletions

View File

@@ -6,4 +6,8 @@ class Physics {
public static overlapCircleAll(center: Vector2, randius: number, results: any[], layerMask = -1){
return this._spatialHash.overlapCircle(center, randius, results, layerMask);
}
public static boxcastBroadphase(rect: Rectangle, layerMask: number = this.allLayers){
return this._spatialHash.aabbBroadphase(rect, null, layerMask);
}
}