Fix position from scaled sprite

This commit is contained in:
samme 2020-05-11 10:38:48 -07:00
parent d6e8600766
commit 1ed0aaf8ba

View file

@ -124,7 +124,7 @@ var StaticBody = new Class({
* @type {Phaser.Math.Vector2}
* @since 3.0.0
*/
this.position = new Vector2(gameObject.x - gameObject.displayOriginX, gameObject.y - gameObject.displayOriginY);
this.position = new Vector2(gameObject.x - (width * gameObject.originX), gameObject.y - (height * gameObject.originY));
/**
* The width of the Static Body's boundary, in pixels.