Search Unity

Sorting by Y axis position

Discussion in '2D' started by b4gieta, Jan 24, 2021.

  1. b4gieta

    b4gieta

    Joined:
    Jul 17, 2018
    Posts:
    97
    Hi
    I'm making a top down game. I set Transparency Sort Mode to Custom Axis and Transparency Sort Axis to 0, 1, 0. The problem is that some of my sprites are taller than the other (frame animation). When the taller sprite is active, it is sorted behind smaller sprite, even if they are on the same Y axis, or the taller one is even lower.

    How can I fix it?
     
  2. unity_72NNT-e0FQsyKw

    unity_72NNT-e0FQsyKw

    Joined:
    Feb 22, 2021
    Posts:
    13
    I made a video on sprite sorting


    it might be the anchor on the sprite. this is what determines the position on the y axis
     
  3. rarac

    rarac

    Joined:
    Feb 14, 2021
    Posts:
    570
    change pivot point of all sprites to the feet of the character