Tilemap Z-Index

I’ve got a few tilemaps, but I’m having an issue setting the z-index. Any idea how I would make one tilemap over another?

Tilemap are DisplayObject and are on the display list, so you can use these methods on the parent Sprite:
setChildIndex
swapChildren
swapChildrenAt
addChildAt
addChild

1 Like

Ah thats great, thanks.

But it’s better (performance wise) to use only one Tilemap. You can set a specific Tileset for your Tiles if your app needs to mix differents Tilesets.

I do think I do that already, if I understand what you mean. When creating an entity I just add the tileset to an array if it doesnt exist, and if I’m using the same tileset on entity creation I reuse that tileset.