Correct center in constructor

This commit is contained in:
samme 2020-02-01 16:19:10 -08:00
parent 34176becb5
commit 37c64dc0a9

View file

@ -281,7 +281,7 @@ var Body = new Class({
* @type {Phaser.Math.Vector2}
* @since 3.0.0
*/
this.center = new Vector2(gameObject.x + this.halfWidth, gameObject.y + this.halfHeight);
this.center = new Vector2(this.position.x + this.halfWidth, this.position.y + this.halfHeight);
/**
* The Body's velocity, in pixels per second.