Skip to content

Commit c07c57f

Browse files
committed
Correct center
1 parent a13d623 commit c07c57f

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
@@ -173,7 +173,7 @@ var StaticBody = new Class({
173173
* @type {Phaser.Math.Vector2}
174174
* @since 3.0.0
175175
*/
176-
this.center = new Vector2(gameObject.x + this.halfWidth, gameObject.y + this.halfHeight);
176+
this.center = new Vector2(this.position.x + this.halfWidth, this.position.y + this.halfHeight);
177177

178178
/**
179179
* A constant zero velocity used by the Arcade Physics simulation for calculations.

0 commit comments

Comments
 (0)