Phaser API Documentation

  Version: 
<static> StaggeredWorldToTileY(worldY, snapToFloor, camera, layer)

Description:

Converts from world Y coordinates (pixels) to staggered tile Y coordinates (tile units), factoring in the layers position, scale and scroll.

Parameters:

name type description
worldY number

The y coordinate to be converted, in pixels, not tiles.

snapToFloor boolean

Whether or not to round the tile coordinate down to the nearest integer.

camera Phaser.Cameras.Scene2D.Camera

The Camera to use when calculating the tile index from the world values.

layer Phaser.Tilemaps.LayerData

The Tilemap Layer to act upon.

Returns:
Description:

The Y location in tile units.

Type:
  • number