Phaser API Documentation

  Version: 
setOrigin([x], [y])

Description:

Sets the origin of this Game Object.

The values are given in the range 0 to 1.

Parameters:

name type arguments Default description
x number <optional> 0.5

The horizontal origin value.

y number <optional> x

The vertical origin value. If not defined it will be set to the value of x.

Returns:
Description:

This Game Object instance.

Since: 3.0.0