Converts from world Y coordinates (pixels) to tile Y coordinates (tile units), factoring in the layers position, scale and scroll.
You cannot call this method for Isometric or Hexagonal tilemaps as they require
both worldX
and worldY
values to determine the correct tile, instead you
should use the worldToTileXY
method.
name | type | arguments | description |
---|---|---|---|
worldY | number |
The y coordinate to be converted, in pixels, not tiles. |
|
snapToFloor | boolean | <optional> |
Whether or not to round the tile coordinate down to the nearest integer. |
camera | Phaser.Cameras.Scene2D.Camera | <optional> |
The Camera to use when calculating the tile index from the world values. |
The tile Y coordinate based on the world value.