Phaser API Documentation

  Version: 
<readonly> centerOfMass: Phaser.Math.Vector2

Description:

The body's center of mass.

Calling this creates a new `Vector2 each time to avoid mutation.

If you only need to read the value and won't change it, you can get it from GameObject.body.centerOfMass.

Since: 3.10.0