- Home /
Isometric Z as Y sorting
I am exploring the "Isometric Z as Y" feature of unity 2d tilemapping.
The scene seems to render pretty well when I setup different heights (Zs) for my tiles. But when I try to include an external GameObject (my character) I can't make it sort correctly. I will try to illustrate the problems I'm having.
This is my scene so far. The green box below the character is where it's real "bottom" side is.
Here is the layout. (1,-4), (2,-4), (1,-5) are the gridding coordinates. Al the floor (dark grey) tiles are in z=-1. The character GameObject is placed in (1,-5,0). The tall tile (green) is a single tile, placed in (1,-5,0). The (blue) tiles are two, placed at (1,-4,0) and (1,-4,1).
As it can be seen, the tiles are perfectly drawn.
The artifacts I find:
The GameObject should render above floor tiles (Z=0 for the GameObject, Z=-1 for the ground tile, both in 1,-5).
All the walls are behind the GameObject, (Y=-5 for the GameObject, Y=-4 for the walls) but the wall with Z=1 renders in front of GameObject.
My setup, GRID SIZE (1,0.5,1) - Transparency sort mode: CUSTOM AXIS, Transparency Sort Axis: (0,1,-0.26).
I hope I have made myself clear enough. English is not my native language. Any help would be very appreciated.
Thanks!!!