Automatic Sorting on a Tilemap - Behind and In Front - Unity Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 ธ.ค. 2024

ความคิดเห็น • 55

  • @Kalahee
    @Kalahee ปีที่แล้ว +2

    This deserves so more likes. This is through and through the automatic sorting plus covers rookie mistakes and those who might have skipped the previous tutorials. In my case, I did everything up to "troubleshooting part" and was annoyed my character was still appearing behind stuff when in front. I was using Unity default 2D capsule as prototype player character, so it obviously doesn't have the pivot at the bottom so had to make a copy and edit that sprite.

  • @kevdog457
    @kevdog457 6 หลายเดือนก่อน +2

    Amazing video! Two things I had trouble with: set the tile map renderer to individual instead of chunk, and if you have a composite collider, be sure to uncheck and recheck the "Used By Composite" button to reset after you have changed the pivot points.

  • @cuddlesgamingvids
    @cuddlesgamingvids 2 หลายเดือนก่อน

    I hope you'll continue making videos soon. I followed every video in this tutorial and everything was crystal clear and very informative. I could even improvise to make it fit my game better. Thank you so much ! I'd love if you could make more videos about how to do some generative things, like for instance duplicate the background so that the character could walk as far away as he'd like and there'll always be a map to walk on, as well as make stuff pop in and out of the map (like loot boxes the player can loot for gear) and have other characters walk and interact with our player.
    Anyways this was extremely helpful, I subscribed. Thank you so much.

  • @stonegolemstudios
    @stonegolemstudios ปีที่แล้ว

    Thanks for the video! Had it working then flipped over to a sprite-lit material and magically stopped. This did the trick.

  • @Turtle4Man-is2ob
    @Turtle4Man-is2ob ปีที่แล้ว

    Thanks ! Just had to set "Transparency Sort Mode" to "Custom Axis" cause it wasn't working but now it's perfect !

  • @CryknoxDev
    @CryknoxDev ปีที่แล้ว +1

    this was really helpful video. it's sad you haven't made any videos in a year

  • @Karutapja
    @Karutapja ปีที่แล้ว

    Really nice video! Was super surprised to see you cover URP difference and potential misconfigurations. Saved me a lot of time.

  • @MOREKMEKk
    @MOREKMEKk 4 หลายเดือนก่อน +1

    your voice is so beautiful and this is a great tutorial, thx

  • @neilmarkcorre5524
    @neilmarkcorre5524 2 ปีที่แล้ว +3

    Such a straight-forward, concise, and easily understandable tutorial - glad TH-cam recommend your channel! I'll start binging this series in case I miss a technique or a Unity feature. Well done!

  • @ProfKo24
    @ProfKo24 8 หลายเดือนก่อน +1

    I had some trouble getting it to work but after a couple of minutes i realized that the mode was chunk instead of individual and then it worked

  • @Cameo221
    @Cameo221 ปีที่แล้ว +5

    Very good!
    There was, however, something else to consider that i think is very important to bring up.
    What if we had 2 tiles that compose a tree, but we wanted to be able to properly sort the upper half of the tree with a player?
    The appropriate sorting point we'd want on the upper half of the tree should be the same point as the lower half of the tree. but how should one accomplish this for tile assets? This has always seemed like a gray area in videos and forums.

    • @ritag9677
      @ritag9677 ปีที่แล้ว +2

      This! I had this issue with an object composed by 2 tiles. Solved it by creating another tilemap, added the Sorting Group component and the tiles that compose the object. This way you can use multiple tiles and sort them as a single unit

    • @Cameo221
      @Cameo221 ปีที่แล้ว

      @@ritag9677 Good idea, I'll have to keep that in mind. I've recently been thinking that I adjust the pivot point of a tile's sprite, which shifts the sprite up, but at least it will do some appropriate y-sorting

  • @baby-sheesh
    @baby-sheesh 2 ปีที่แล้ว +1

    thank you for even considering that some might have urp.

  • @michaelbenny659
    @michaelbenny659 2 ปีที่แล้ว

    Excellent video, exactly what I was looking for. I am a fan of this video series

  • @dennismmj
    @dennismmj 2 ปีที่แล้ว +17

    Important: Tilemap Renderer component mode variable should be individual.

    • @sebrukai3337
      @sebrukai3337 2 ปีที่แล้ว +1

      bro thank you!! found this after 3 hours of brain pain

    • @chrishurn7097
      @chrishurn7097 2 ปีที่แล้ว

      thank you!

    • @joshuafoster4214
      @joshuafoster4214 2 ปีที่แล้ว

      Haha nice one thank you! :)

    • @savingalice1600
      @savingalice1600 9 หลายเดือนก่อน

      these random comments under yt videos are such MVP's man

    • @jakeroberts8989
      @jakeroberts8989 5 หลายเดือนก่อน

      I love u thank u

  • @hanni6383
    @hanni6383 8 วันที่ผ่านมา

    What can i do?
    My player have a height of 2 tiles. If i go behind a tree with a lets say 6 tiles height i just cant sorting the bottem tile wiith the colloder part. How can i solting the second tile, the tile with the tree trunk?

  • @Chubzdoomer
    @Chubzdoomer ปีที่แล้ว +1

    Why did you stop making tutorials!? 😞 Just found your channel and you do such a great job!

  • @aurabeth1680
    @aurabeth1680 2 ปีที่แล้ว

    This was what I was looking for. Thank you so much!

  • @cyanberry5603
    @cyanberry5603 8 หลายเดือนก่อน +1

    "Slight" issue im having: In my game, for some reason, the game isn't sorting by individual tiles, but rather the player's y-value relative to the entire tileset's. (So, if the player is above y=0, they appear in front of everything, and if they're below y=0, they're below everything). How would I fix this?

    • @pumpum1697
      @pumpum1697 5 หลายเดือนก่อน +1

      I got the same issue. Were you able to find a solution?

    • @Snackie_
      @Snackie_ หลายเดือนก่อน

      I was having the same issue, turns out you have to set Mode from Chunk to Invidual in the Tilemap Renderer.

  • @gibs9731
    @gibs9731 ปีที่แล้ว +1

    Really good tutorials! Please consider continuing with them adding opponents, combat, dialogue system, inventory and so on! ;)

  • @oscart482
    @oscart482 2 ปีที่แล้ว

    Thanks, this video was exactly what I was looking for!

  • @dune22
    @dune22 8 หลายเดือนก่อน

    This was super helpful!!!! Thank you!

  • @QuinnJohnson16
    @QuinnJohnson16 ปีที่แล้ว

    Around 2:42 you show the character sprite colliding with the top of the 1x1 box. But then you move to the other box and the character sorts behind it. I think I'm missing something here as my collision objects tileset has colliders that are blocking the player from moving behind them. Any help is appreciated!

  • @Toxicblackmambahs
    @Toxicblackmambahs ปีที่แล้ว

    Great Tutorial!

  • @Vasto8Lorde
    @Vasto8Lorde ปีที่แล้ว +5

    Hey guys, I'm on the latest version of Unity. I've followed all the steps but for some reason the tiles with a custom physics shape appear "above/in front" of my player.
    Anyone with similar issues?

  • @dastral3201
    @dastral3201 6 หลายเดือนก่อน +2

    Is your Discord server still active? Got some questions ._.

  • @Ziplock9000
    @Ziplock9000 ปีที่แล้ว +4

    Unfortunately this only works when objects on your tilemap are only 1 tile high. Supposed you had a static tree or a house that was 2 tiles high in your tile palette, you draw them onto your map as 2 tiles.. It looks fine, but the sorting breaks down as it considers them like two objects , one in front of the other. Sure you can make this a sprite instead, but it means you have to do this for EVERY object higher than 1 tile.

    • @Cameo221
      @Cameo221 ปีที่แล้ว +2

      I have the exact same thoughts. I'm attempting to find out the best solution for this, but it seems as though there's no true solution that I've found as of yet. I'm continuing the hunt though :)

    • @Snackie_
      @Snackie_ หลายเดือนก่อน

      Have you guys find a solution to that?

    • @angelwenceslaohernndezhern3883
      @angelwenceslaohernndezhern3883 หลายเดือนก่อน

      @@Snackie_ it seems not :c

  • @heyboah3333
    @heyboah3333 ปีที่แล้ว +1

    THANK YOU!

  • @Konslufius
    @Konslufius ปีที่แล้ว

    Works super well, but I had a problem with indoor areas. Sometimes you have tiles that are supposed to be always above the player. Just made a "Topper" and gave it 99 in the sorting layer. That way it is impossible for me to fuck things up.

  • @MenelikiGaming
    @MenelikiGaming ปีที่แล้ว

    Nice! Thank you so much!

  • @4n8_
    @4n8_ ปีที่แล้ว

    Thanks for this

  • @arisaek7764
    @arisaek7764 ปีที่แล้ว

    very helpful!

  • @ViniciusCurto
    @ViniciusCurto 2 ปีที่แล้ว

    Hi! Great channel and content! I just saw your video on animated tiles, there's a way to pause them and play the animation when I want it? I want it to stay on the first frame, play the animation with player input a specific button and then stop on the last frame.

  • @slowfuse
    @slowfuse ปีที่แล้ว

    holy shit thank you i wasted my whole saturday on this...

  • @saern6612
    @saern6612 ปีที่แล้ว

    Please make more videos. I want to make a farm game and want to understand how it works. greetings from Germany

  • @JellyMudkip
    @JellyMudkip ปีที่แล้ว

    thanks for the video :D

  • @hejhejhej952
    @hejhejhej952 11 หลายเดือนก่อน

    Awesome!

  • @AxayGadhiya-n4n
    @AxayGadhiya-n4n 8 หลายเดือนก่อน

    thnx

  • @djuradjstankovic6337
    @djuradjstankovic6337 11 หลายเดือนก่อน

    um just repeating 0:43 it sounds awesome

  • @blasterxt9
    @blasterxt9 2 ปีที่แล้ว

    Hey please do 2d grass wind effect in unity