Phaser API Documentation

  Version: 
centerOn(x, y)

Description:

Moves the Camera so that it is centered on the given coordinates, bounds allowing.

Parameters:

name type description
x number

The horizontal coordinate to center on.

y number

The vertical coordinate to center on.

Returns:
Description:

This Camera instance.

Since: 3.11.0