Skip to content

Commit 7fa6d17

Browse files
authored
Merge pull request phaserjs#5150 from samme/fix/static-body-from-scaled-sprite
Fix static body position from scaled sprite
2 parents d455b79 + 1ed0aaf commit 7fa6d17

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)