Skip to content

Commit 34176be

Browse files
committed
Correct position in constructor
1 parent 2a7cfb6 commit 34176be

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/physics/arcade/Body.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,10 @@ var Body = new Class({
148148
* @type {Phaser.Math.Vector2}
149149
* @since 3.0.0
150150
*/
151-
this.position = new Vector2(gameObject.x, gameObject.y);
151+
this.position = new Vector2(
152+
gameObject.x - gameObject.scaleX * gameObject.displayOriginX,
153+
gameObject.y - gameObject.scaleY * gameObject.displayOriginY
154+
);
152155

153156
/**
154157
* The position of this Body during the previous step.

0 commit comments

Comments
 (0)