Updated Body.reset call.

This commit is contained in:
photonstorm 2016-05-23 12:54:41 +01:00
parent 8743e8952c
commit 16e9acac84

View file

@ -716,10 +716,10 @@ Phaser.Physics.Arcade.Body.prototype = {
this.angularVelocity = 0;
this.angularAcceleration = 0;
this.position.x = (this.sprite.world.x - (this.sprite.anchor.x * this.sprite.width)) + this.sprite.scale.x * this.offset.x;
this.position.x = (x - (this.sprite.anchor.x * this.sprite.width)) + this.sprite.scale.x * this.offset.x;
this.position.x -= this.sprite.scale.x < 0 ? this.width : 0;
this.position.y = (this.sprite.world.y - (this.sprite.anchor.y * this.sprite.height)) + this.sprite.scale.y * this.offset.y;
this.position.y = (y - (this.sprite.anchor.y * this.sprite.height)) + this.sprite.scale.y * this.offset.y;
this.position.y -= this.sprite.scale.y < 0 ? this.height : 0;
this.prev.x = this.position.x;