How to y sort on tilemaplayer?

Godot Version

4.5.1

Question

im trying to create a wall with tilemaplayer, the player needs to go in front of hit when below and behind when on top of it (basic perspective). i created a main node with the player and a node called Textures that has the tilemaplayer of the walls in it. i turned on the y sort on the main, on the node Textures (in the main), on the tilemaplayer and his father node, but still doesnt’t work. Can you help please?

You could make sure that all of the TileMapLayer are on the same Z index. So if the Z for your wall tilemaplayer is, let’s say, 1, but all of the other nodes in your scene are at Z zero, the tilemaplayer will always be drawn in front of whatever is trying to go behind it (by my reasoning, so if you see any errors in my logic please tell me):slightly_smiling_face:

Maybe this will help you: How to make y-sort for TilemapLayer in Godot 4.3? - #4 by Dowlgrett

You can change the Y Sort on specific tiles if you select the TileMapLayer node, click TileSet (bottom of the screen) > then Paint > then in the Paint Properties dropdown select Y Sort Origin.

You set the value (in your case, raise it) and then apply it to the tile you want. This will apply it to every instance of that specific tile I think, though, so if you use that tile somewhere else that you don’t want that to happen to then hopefully someone else can answer that for you.

I’m a beginner but I hope that helps.