Search Unity

{Solved}Changing the Sorting Layer of rendered Sprites

Discussion in '2D' started by TheTopSkull, Jun 20, 2015.

  1. TheTopSkull

    TheTopSkull

    Joined:
    Oct 21, 2012
    Posts:
    10
    Hi people!
    I was wondering if someone could point me in the direction to this problem, I've looked around and can't seem a good solution to it.
    My difficulty is making a sort of depth in this top down project where the player can be in front of AI and objects while also being able to move behind where the AI and the objects in question are then in front of the player, sort of like Legend of Zelda's top down games.

    I found using sorting layers I could have the Player character(BLUE) be in front of the AI(RED) but this also meant this:

    These are also using 2D box colliders this is making the whole standing on shoulders thing but I was wondering where I can find a tutorial/script where I can change the Sorting Layers or something similar so that the player can move in front and behind things. Thank you.
     
  2. TheTopSkull

    TheTopSkull

    Joined:
    Oct 21, 2012
    Posts:
    10
    SDJdasha and theANMATOR2b like this.
  3. knarteyt

    knarteyt

    Joined:
    Apr 19, 2021
    Posts:
    3
    thank you so much, ik your post is old, but helped me sooo much