修复ArcadeRigidbody不触发OnEntityTransform事件
This commit is contained in:
@@ -100,7 +100,7 @@ module es {
|
||||
* @param layerMask
|
||||
*/
|
||||
public static boxcastBroadphaseExcludingSelfNonRect(collider: Collider, layerMask = this.allLayers) {
|
||||
let bounds = collider.bounds.clone();
|
||||
let bounds = collider.bounds;
|
||||
return this._spatialHash.aabbBroadphase(bounds, collider, layerMask);
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ module es {
|
||||
* @param layerMask
|
||||
*/
|
||||
public static boxcastBroadphaseExcludingSelfDelta(collider: Collider, deltaX: number, deltaY: number, layerMask: number = Physics.allLayers) {
|
||||
let colliderBounds = collider.bounds.clone();
|
||||
let colliderBounds = collider.bounds;
|
||||
let sweptBounds = colliderBounds.getSweptBroadphaseBounds(deltaX, deltaY);
|
||||
return this._spatialHash.aabbBroadphase(sweptBounds, collider, layerMask);
|
||||
}
|
||||
|
||||
@@ -225,7 +225,7 @@ module es {
|
||||
*/
|
||||
public overlapRectangle(rect: Rectangle, results: Collider[], layerMask: number) {
|
||||
this._overlapTestBox.updateBox(rect.width, rect.height);
|
||||
this._overlapTestBox.position = rect.location;
|
||||
this._overlapTestBox.position = rect.location.clone();
|
||||
|
||||
let resultCounter = 0;
|
||||
let potentials = this.aabbBroadphase(rect, null, layerMask);
|
||||
@@ -265,7 +265,7 @@ module es {
|
||||
let bounds = new Rectangle(circleCenter.x - radius, circleCenter.y - radius, radius * 2, radius * 2);
|
||||
|
||||
this._overlapTestCircle.radius = radius;
|
||||
this._overlapTestCircle.position = circleCenter;
|
||||
this._overlapTestCircle.position = circleCenter.clone();
|
||||
|
||||
let resultCounter = 0;
|
||||
let potentials = this.aabbBroadphase(bounds, null, layerMask);
|
||||
|
||||
Reference in New Issue
Block a user