Search Unity

Sprite appear through another sprite

Discussion in '2D' started by Colatran, Feb 17, 2020.

  1. Colatran

    Colatran

    Joined:
    Jul 7, 2019
    Posts:
    14
    Hi
    So this:


    Both sprites have the same position and scale, just different rotation.
    But its like if one was tansparent.

    They's supose to be opaque.

    Any hint?
     
  2. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,637
    Hi @Colatran

    "They's supose to be opaque."

    They are, but I don't think sprites get sorted on pixel level like you probably expect to happen. Edit - by "opaque" you probably mean that you expected sprites to intersect with each other, like typical 3D planes.

    You can see sprite sorting working by moving your sprite so that it's pivot is either behind or in front of the other sprite, and by default sprites will be sorted like this. Read about 2D Sorting and SpriteRenderer settings, there you can find more info.

    There are settings like order in layer and sorting layers. You can use these to order sprites, but these either won't change how sprites are rendered.
     
  3. Colatran

    Colatran

    Joined:
    Jul 7, 2019
    Posts:
    14
    Thank you that's pretty much all I wanted to know.