Phaser API Documentation

<static> QuickSet(child, alignTo, position, [offsetX], [offsetY])


Takes a Game Object and aligns it next to another, at the given position. The alignment used is based on the position argument, which is a Phaser.Display.Align property such as LEFT_CENTER or TOP_RIGHT.


name type arguments description
child Phaser.GameObjects.GameObject

The Game Object that will be positioned.

alignTo Phaser.GameObjects.GameObject

The Game Object to base the alignment position on.

position number

The position to align the Game Object with. This is an align constant, such as Phaser.Display.Align.LEFT_CENTER.

offsetX number <optional>

Optional horizontal offset from the position.

offsetY number <optional>

Optional vertical offset from the position.


The Game Object that was aligned.

Since: 3.22.0