How to z-sort tiles relative to player position

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By nullsalad

In the 2D isometric demo, which can be found by searching through templates in the project manager, the character is able to move behind a single tile of a pillar such that the pillar occludes them when they are above it, and move in front of a pillar when they are below it. I’m trying to do a similar thing. I tried replicating all of the parameters best I could, paying special attention to check Z as relative in the Z index component (though this is set by default). Scouring through the example project, it seems like there are no scripts that’ll are actively z-sorting based of player y-position. What’s the best way to do this?

:bust_in_silhouette: Reply From: Antilo

Notice that TileMap Node have a property called Y Sort … that you can check… every direct child of it will be draw as function of its Y position