Phaser API Documentation

  Version: 
centerOnY(y)

Description:

Moves the Camera vertically so that it is centered on the given y coordinate, bounds allowing. Calling this does not change the scrollX value.

Parameters:

name type description
y number

The vertical coordinate to center on.

Returns:
Description:

This Camera instance.

Since: 3.16.0