Phaser API Documentation

  Version: 
updateFromGameObject()

Description:

Updates the Body's position, width, height, and center from its Game Object and offset.

You don't need to call this for Dynamic Bodies, as it happens automatically during the physics step. But you could use it if you have modified the Body offset or Game Object transform and need to immediately read the Body's new position or center.

To resynchronize the Body with its Game Object, use reset() instead.

Since: 3.24.0