Search Unity

Can't see player.

Discussion in '2D' started by Adims, Jan 1, 2019.

  1. Adims

    Adims

    Joined:
    Dec 29, 2018
    Posts:
    11
    Firstly, I am new to programming, and game development/design. I am in the process of self-learning via watching videos and reading forums.

    Now in the sample game I am making I am having a huge issue. I am using a program called Tiled to make the layout of my 2D RPG game, and I am using SuperTiled2Unity / Tiled2Unity to export my files from my computer to Unity. Now I figured out how to get the map on Unity, and how to move it around, but my problem now is that my Character is always behind my map, no matter what layer I put him on (even if I create a new layer) unless of course I mess with the (Z) position and push the map behind my Character (which I don't want to do since it is a 2D game, and then that messes with the layer values in my map)

    Can anyone please help me with this issue?
    (PS: Sorry if this is not the correct place to post the question.)
    Player troubles.png
     
  2. WheresMommy

    WheresMommy

    Joined:
    Oct 4, 2012
    Posts:
    890
    How does your hierarchy look like? Is the player below the map or above?
     
  3. Adims

    Adims

    Joined:
    Dec 29, 2018
    Posts:
    11
    In my hierarchy the it goes Scene > Camera > Map > Player (I have tested moving these around and also messing with the sorting layer, and nothing worked, only success I had was when I messed with the Z axis)
     
  4. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,637
    @Adims

    Hi.

    There are several ways to sort and order sprites.

    It sounds like you haven't read the docs, and it also sounds like you haven't checked the official tutorial videos either.

    Just google "unity sprite sorting" and you'll start finding links and keywords. Check these, and you'll know how to sort sprites.
     
  5. WheresMommy

    WheresMommy

    Joined:
    Oct 4, 2012
    Posts:
    890
    Maybe give us a screenshot of the player and the tile inspector
     
  6. Adims

    Adims

    Joined:
    Dec 29, 2018
    Posts:
    11
    Player troubles.png
     
  7. WheresMommy

    WheresMommy

    Joined:
    Oct 4, 2012
    Posts:
    890
    Is the tiled map a plugin or similiar? I guess, this one is putting sprites somewhere above your player, but I do not know that script. Are you sure, the Default Layer is below the Player layer? Cause Order in Layer just cares about the order in that specific layer.
     
  8. Adims

    Adims

    Joined:
    Dec 29, 2018
    Posts:
    11
    Okay, I had to back track a bit to solve the problem. If anyone else is having the problem, here is the solution. Player troubles.png
     
    WheresMommy likes this.
  9. WheresMommy

    WheresMommy

    Joined:
    Oct 4, 2012
    Posts:
    890
    As i thought, thanks for clarification :)
     
  10. LillyB

    LillyB

    Joined:
    Nov 23, 2018
    Posts:
    11
    Looks like your game isn't fully ready yet? When will it launch?
     
  11. Adims

    Adims

    Joined:
    Dec 29, 2018
    Posts:
    11
    This isn't a game for launch, I am just using it as a learning project. Getting use to how Unity works, and learning coding and what not. Thank you for your interest :)
     
    LillyB likes this.
  12. James976

    James976

    Joined:
    Feb 20, 2019
    Posts:
    6
    What stage are you at?
     
  13. LillyB

    LillyB

    Joined:
    Nov 23, 2018
    Posts:
    11
    okey! Carry on buddy.