Skip to content

Commit 7018ca2

Browse files
committed
Position in Body.reset phaserjs#2470
1 parent 54683b7 commit 7018ca2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/physics/arcade/Body.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -713,8 +713,8 @@ Phaser.Physics.Arcade.Body.prototype = {
713713
this.angularVelocity = 0;
714714
this.angularAcceleration = 0;
715715

716-
this.position.x = (x - (this.sprite.anchor.x * this.width)) + this.offset.x;
717-
this.position.y = (y - (this.sprite.anchor.y * this.height)) + this.offset.y;
716+
this.position.x = (x - (this.sprite.anchor.x * this.sprite.width)) + this.offset.x;
717+
this.position.y = (y - (this.sprite.anchor.y * this.sprite.height)) + this.offset.y;
718718

719719
this.prev.x = this.position.x;
720720
this.prev.y = this.position.y;

0 commit comments

Comments
 (0)