Skip to main content
1 of 2
idbrii
  • 987
  • 6
  • 21

According to this issue, there is currently no support in Godot for customizing the draw order how you want, but there are some workarounds:

  1. Manually sort your tiles. "TileMaps currently break ties by rendering the oldest tiles first" so you can change the draw order by creating tiles in your intended order.

  2. "changing the second value in the TileMap's cell_custom_transform to a very small number like 0.01 so tiles are rendered from left to right."

This is because the tiles on the left have an indiscernibly smaller y value. This could be changed to -0.01 to render from right to left.

This does mean that your tiles won't be perfectly horizontally aligned, and will drift by a pixel every 100 tiles. But, this small amount of drift may be preferable to the blinking of the xsort() function I provided.

idbrii
  • 987
  • 6
  • 21