Phaser API Documentation

  Version: 
clampY(y)

Description:

Takes a y value and checks it's within the range of the Camera bounds, adjusting if required. Do not call this method if you are not using camera bounds.

Parameters:

name type description
y number

The value to vertically scroll clamp.

Returns:
Description:

The adjusted value to use as scrollY.

Type:
  • number
Since: 3.11.0