mirror of
https://github.com/photonstorm/phaser
synced 2024-11-10 07:04:31 +00:00
Merge pull request #5150 from samme/fix/static-body-from-scaled-sprite
Fix static body position from scaled sprite
This commit is contained in:
commit
7fa6d17e17
1 changed files with 1 additions and 1 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue