Z-Index for a 2-piece tile.

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

Hello! I want to obtain this effect:
enter image description here

Basically, creating an “effect” where you can go behind some objects.
And this is my tile:
enter image description here

(Basically, creating an “effect” where you can go behind some objects)

My question is, how can I set the Z-Inex to be higher for the red part than the other one, but, here’s the “catch”, without making 2 different tiles. Is it possible?

:bust_in_silhouette: Reply From: exuin

You’re not supposed to set the Z-index of tiles on a tilemap. Use Y-sort instead.

I’m not sure what the issue is here. Just make one big tile. Tiles don’t have to be the actual size specified in the tilemap. Make sure to offset the texture and shape and set the origin of the tile to be on the bottom.

:bust_in_silhouette: Reply From: rakkarage

one solution:

  • split into two tiles
  • make a new layer (in 4) or tileMap (in 3) called top
  • set each half tile where it needs to go

i wish you could set z_index for each part too