Skip to content

Commit 1ed0aaf

Browse files
committed
Fix position from scaled sprite
1 parent d6e8600 commit 1ed0aaf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/physics/arcade/StaticBody.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ var StaticBody = new Class({
124124
* @type {Phaser.Math.Vector2}
125125
* @since 3.0.0
126126
*/
127-
this.position = new Vector2(gameObject.x - gameObject.displayOriginX, gameObject.y - gameObject.displayOriginY);
127+
this.position = new Vector2(gameObject.x - (width * gameObject.originX), gameObject.y - (height * gameObject.originY));
128128

129129
/**
130130
* The width of the Static Body's boundary, in pixels.

0 commit comments

Comments
 (0)