Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Beginner Need Help on visuals overlap 2d character

Discussion in '2D' started by rexuslim, May 17, 2023.

  1. rexuslim

    rexuslim

    Joined:
    Apr 12, 2023
    Posts:
    2
    Hello everyone, I'm still a beginner and I have a small question to ask. In my current game, I have a 3D environment with 2D characters. The visuals of my character (a fox) look a bit strange. When standing in front of a monster, it appears normal, but when standing behind the monster, the visuals overlap.
    I have already adjusted the sorting layer and order in layer of the character, but the issue remains the same.

    I would appreciate it if someone could provide guidance.

    When player stand in front of monster
    normallJPG.JPG


    When player stand behind of monster
    notnormall.JPG


    setting
    upload_2023-5-17_16-26-1.png

    Sprite Renderer of Monster
    upload_2023-5-17_16-27-14.png



    Sprite Renderer of Player
    upload_2023-5-17_16-28-1.png
     
  2. karderos

    karderos

    Joined:
    Mar 28, 2023
    Posts:
    376
    you are mixing everything up in a bad way

    1st - put every sprite on the same layer

    2nd - put every sprite on same order in layer

    3rd - set up transparency sort axis to sort based on Y

    4th - set pivot point of sprites on their feet

    then it should work correctly
     
  3. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,321
    Also, please don’t add tags like 2D physics when it’s not related. They are used to find posts.

    Thanks.
     
    rexuslim likes this.
  4. rexuslim

    rexuslim

    Joined:
    Apr 12, 2023
    Posts:
    2
    Thanks, will try in awhile