Phaser API Documentation

<static> TileToWorldX(tileX, camera, layer)


Converts from tile X coordinates (tile units) to world X coordinates (pixels), factoring in the layer's position, scale and scroll.


name type description
tileX number

The x coordinate, in tiles, not pixels.

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.

  • number
Since: 3.0.0