Phaser API Documentation

  Version: 
tileToWorldX(tileX, [camera])

Description:

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

Parameters:

name type arguments description
tileX number

The x coordinate, in tiles, not pixels.

camera Phaser.Cameras.Scene2D.Camera <optional>

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

Returns:
Description:

The Tile X coordinate converted to pixels.

Type:
  • number
Since: 3.50.0