Skip to content

Commit 37c64dc

Browse files
committed
Correct center in constructor
1 parent 34176be commit 37c64dc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/physics/arcade/Body.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ var Body = new Class({
281281
* @type {Phaser.Math.Vector2}
282282
* @since 3.0.0
283283
*/
284-
this.center = new Vector2(gameObject.x + this.halfWidth, gameObject.y + this.halfHeight);
284+
this.center = new Vector2(this.position.x + this.halfWidth, this.position.y + this.halfHeight);
285285

286286
/**
287287
* The Body's velocity, in pixels per second.

0 commit comments

Comments
 (0)