Updated physics body to use localTransform. Updated tanks demo.

This commit is contained in:
photonstorm
2013-10-09 05:13:38 +01:00
parent 83a00862be
commit ca9321ef42
7 changed files with 53 additions and 63 deletions
+4 -4
View File
@@ -1286,8 +1286,8 @@ Phaser.Physics.Arcade.prototype = {
pointer = pointer || this.game.input.activePointer;
this._dx = displayObject.x - pointer.x;
this._dy = displayObject.y - pointer.y;
this._dx = displayObject.worldX - pointer.x;
this._dy = displayObject.worldY - pointer.y;
return Math.sqrt(this._dx * this._dx + this._dy * this._dy);
@@ -1340,8 +1340,8 @@ Phaser.Physics.Arcade.prototype = {
pointer = pointer || this.game.input.activePointer;
this._dx = pointer.x - displayObject.x;
this._dy = pointer.y - displayObject.y;
this._dx = pointer.worldX - displayObject.x;
this._dy = pointer.worldY - displayObject.y;
return Math.atan2(this._dy, this._dx);