Unexpected behavior of TileSets/TileMaps

Godot Version

v4.2.2.stable.flathub [15073afe3]


Hello people,

I’m a beginner in game dev who is struggling right now with TileMaps. So I’ve created a TileMap, with a new TileSet, with 3 tilesets.

Then, I painted my base with the Floor TileSet.

After that, I tried to add some details on top of this grass like some tiles from nature and some from House tilesets. But when trying to do so, the following is happening:

Just so you know, this only happens when I draw on top of the grass tiles. Otherwise, it is working fine. Do you have any idea why this might be happening?

This is probably a sorting order problem. set the z-index of the grasslayer to -1 and on the building layer to 0

Thank you so much. That worked. Just to confirm, is this the correct way to set the z-index?

its ONE way to set it, but i dont recommend doing it this way. instead use the layers in the tilemap node. paint the grass node on a grasslayer and the buildings on the building layer. Then you can change the z-index on the layers


Got it! Thank you so much for your time :). Really appreciate it.

1 Like

Exactly this.

I use a ground layer and a decorations layer.

1 Like