I am trying to achieve Y sorting on my 2D topdown game with a sprite and multiple tilemaps.

Let me explain, I designed my level with 2 tilemaps : Walls and design


Walls tilemap


Design tilemap

What I tried

I put my player and the 2 tilemaps on the same sorting layer and the same sorting order

On the 2 tilemaps I set the tilemap renderer mode to : individual

On projects settings > Graphics I set the transparency sort mode to Custom axis and Transparency sort axis to (0,1,0)

My problem

The walls tilemap is rendered on top of the design tilemap

enter image description here

But if I change the sorting layer or the order in layer to make the design layer to be rendered on top of the walls layer, it will always be on top of the player too and the y sorting wont work

My question

So my questions are :

  • how can I make the design tilemap to be rendered on top of the walls tilemap without changing their Sorting layer or order in layer ?

  • Is there any other ways to achieve y sorting ?

  • 2
    \$\begingroup\$ Sorting is based on the sprite pivot position. Make sure the sprite's pivot matches its actual shape. For example, the axis of the stone pillar should be at center-1/5 bottom or somewhere like that. \$\endgroup\$
    – Mangata
    Jul 18 at 8:17


You must log in to answer this question.

Browse other questions tagged .