Phaser API Documentation

  Version: 
<static> GetOffsetX(gameObject)

Description:

Returns the amount the Game Object is visually offset from its x coordinate. This is the same as width * origin.x. This value will only be > 0 if origin.x is not equal to zero.

Parameters:

name type description
gameObject Phaser.GameObjects.GameObject

The Game Object to get the bounds value from.

Returns:
Description:

The horizontal offset of the Game Object.

Type:
  • number
Examples:
Since: 3.0.0