diff --git a/v3/src/physics/impact/Body.js b/v3/src/physics/impact/Body.js index b966248a8..1681279f6 100644 --- a/v3/src/physics/impact/Body.js +++ b/v3/src/physics/impact/Body.js @@ -58,6 +58,8 @@ var Body = new Class({ this.debugShowBody = world.defaults.debugShowBody; this.debugShowVelocity = world.defaults.debugShowVelocity; this.debugBodyColor = world.defaults.bodyDebugColor; + + this.updateCallback; // min 44 deg, max 136 deg this.slopeStanding = { min: 0.767944870877505, max: 2.3736477827122884 }; @@ -135,6 +137,11 @@ var Body = new Class({ graphic.lineBetween(x, y, x + this.vel.x, y + this.vel.y); } } + + if (this.updateCallback) + { + this.updateCallback(this); + } }, skipHash: function () diff --git a/v3/src/physics/impact/World.js b/v3/src/physics/impact/World.js index f63bb6c89..48ec6b51e 100644 --- a/v3/src/physics/impact/World.js +++ b/v3/src/physics/impact/World.js @@ -210,7 +210,7 @@ var World = new Class({ } } - // Run collision against them all now they're in the new positions from the udpate + // Run collision against them all now they're in the new positions from the update for (i = 0; i < len; i++) {