Making an Isometric Tilemap with Elevations and Colliders in UNITY

Поділитися
Вставка
  • Опубліковано 27 чер 2024
  • Make an isometric tilemap with walkable areas, non-walkable areas, and elevations.
    ᐅGet the full Source Code Bundle to my Unity Tutorials 🤓
    sam-yam.itch.io/samyam-full-s...
    Another way to add elevation with the Z as Y tilemap is by changing the Z position of your tile palette brush and also add a Z value to the Custom Axis Sort setting we changed. According to Unity, a grid with dimensions of (1, 0.5, 1) which is the default will have it's Z axis sort as -0.26. More information can be found here: docs.unity3d.com/Manual/Tilem...
    Be sure to put your tilemap back to Chunk Mode and put the tiles in a sprite atlas to help performance in your build. Individual mode is useful for editing the tilemap.
    🔗 Relevant Video Links 🔗
    ᐅMouse Click Movement in Isometric Tilemap - Unity Tutorial
    • Mouse Click Movement i...
    🤝 Support Me 🤝
    Patreon: / samyg
    Donate: ko-fi.com/samyam
    Disclosure: This post may contain affiliate links, which means we may receive a commission if you click a link and purchase something that we have recommended. While clicking these links won't cost you any money, they will help me fund my development projects while recommending great assets!
    😎 Cool Unity Assets 😎
    ᐅPeek - Editor Toolkit: assetstore.unity.com/packages...
    ᐅEditor Console Pro: assetstore.unity.com/packages...
    ᐅRainbow Folders 2: assetstore.unity.com/packages...
    💖💖THANK YOU TO ALL MY PATRONS 💖💖
    ❯❯❯ My Links ❮❮❮
    💗 Patreon 💗
    / samyg
    💬 Discord Server 💬
    / discord
    🐦 Twitter 🐦
    / samyam_utube
    📚 Facebook 📚
    / samyam.youtube
    🎵 Music 🎵
    Fretless by Kevin MacLeod
    Link: incompetech.filmmusic.io/song...
    License: creativecommons.org/licenses/b...
    👍 Like and Subscribe! 👍
    🖥️ Computer Setup 🖥️
    *As an Amazon Associate I earn from qualifying purchases.
    www.amazon.com/shop/samyam
    #unity3d #unitytutorial #unity2021
  • Навчання та стиль

КОМЕНТАРІ • 102

  • @sirnicoosokhan4056
    @sirnicoosokhan4056 3 роки тому +32

    Best explanation that I have found on UA-cam to correct my tile map problems. Thanks a million.

  • @jamesr6311
    @jamesr6311 2 роки тому +21

    After watching so many other isometric tile map videos this is by far the best produced, most concise, and taught the ideas so well! Thank you!

    • @samyam
      @samyam  2 роки тому +3

      Yay! Thank you 😄

    • @warningshotdesigns
      @warningshotdesigns 2 роки тому

      @@samyam I agree with them completely. The only critique I have is talk a little slower, or give a little pause between steps. I had to rewind over and over lol

  • @danielgilbert8338
    @danielgilbert8338 3 роки тому +5

    Have been trying to figure out collision in an isometric environment for a while and this is the video that finally got it to make sense. Thanks! Keep up the great work

  • @psychicmrs6410
    @psychicmrs6410 3 роки тому +1

    your isometric videos have been so helpful! Thank you so much

  • @rag544
    @rag544 2 роки тому +1

    I have never done a thing with tiles before but now i feel enlightened. Thank you so much for this :)

  • @adventuresinTW
    @adventuresinTW 3 роки тому +3

    This is one of the best step by step tutorials put together. Thanks for doing this.

    • @samyam
      @samyam  3 роки тому +1

      Thank you! 😄

  • @reneandersen7382
    @reneandersen7382 3 роки тому

    Really a good explanation on the tilemap!

  • @Sohodollie
    @Sohodollie 2 роки тому

    What a great video, seriously. I've watched a couple of tutorials but this one really explains and shows everything perfectly. Can't wait to add movement in the next tut!

    • @samyam
      @samyam  2 роки тому +1

      🙌 Thank you!

  • @Nico-wf7wg
    @Nico-wf7wg 2 роки тому

    What a nice tutorial, thanks so much!

  • @raccoonduck5406
    @raccoonduck5406 3 роки тому

    Perfect tutorial! Thanks a billion.

  • @ArtBySabin
    @ArtBySabin 3 роки тому

    Great channel and content! I just downloaded these tiles, can't wait to play!

    • @samyam
      @samyam  3 роки тому

      Thanks!! 😄

  • @charatjeeravipoolvarn464
    @charatjeeravipoolvarn464 2 роки тому

    Explanation is so good. Clear and understand. Thank you.

  • @envi5532
    @envi5532 11 місяців тому

    best isometric tutorial out there thank you

  • @Oliver_Koppert
    @Oliver_Koppert 3 роки тому

    Thanks, Samyam!
    Once again your video is much clearer & explains the tools far better than a whole bunch of other videos.
    I'ma have to stop doing general searches for tutorials & check your content first before wasting hours trawling through generic, unhelpful poop!
    Thank you!

  • @hacbe1894
    @hacbe1894 Рік тому

    This is great our professor has recommended this to us! Thank you very much!

    • @samyam
      @samyam  Рік тому

      That’s awesome to hear thanks!!

  • @ecomkevv
    @ecomkevv 4 роки тому +1

    DUUUUUUUUUUUUDE Huge thanks for making this, had a really hard time figuring this shit out!

  • @NickChecan
    @NickChecan 6 місяців тому

    Your tutorials are great! That is exactly what I was looking for.

    • @samyam
      @samyam  6 місяців тому

      Thanks!

  • @uluulgen3878
    @uluulgen3878 3 роки тому +1

    sabahtan beri bunu ariyordum cok tesekkur ederim.

  • @coderious4568
    @coderious4568 3 роки тому

    Great video! It's bookmarked for next time I work with tilemaps

  • @danenriq3451
    @danenriq3451 3 роки тому

    the unsung hero of isometric tutorials, you deserve more subs honestly

    • @samyam
      @samyam  3 роки тому +1

      Thanks :)

  • @robertkillerrodrigues
    @robertkillerrodrigues 3 роки тому

    Thank you, I loved this tutorial tomorrow I will gonna test this, I watched so much videos to see how to resolve this problem and nobody was talking about it, tank you so much, now i can stat my beautiful project of MMORPG 2.5d

    • @samyam
      @samyam  3 роки тому

      Good luck!

  • @dotaportalvideo
    @dotaportalvideo 4 роки тому +2

    Really cool video on a topic I wish there were more videos on. Found this link on reddit.

    • @samyam
      @samyam  4 роки тому

      Thanks! Soon I'll be uploading a video on Mouse Movement for Isometric maps :)
      Feel free to join my Discord if you have any questions: discord.gg/B9bjMxj

  • @darkeinhardt3760
    @darkeinhardt3760 2 роки тому

    BEST TUTORIAL EVER, im making a game thx to u

  • @vinipossatto9586
    @vinipossatto9586 3 роки тому

    nice video I appreciate your work

  • @senorspoons6416
    @senorspoons6416 Рік тому

    Thank you so much!

  • @rs_2305
    @rs_2305 2 роки тому

    Nicely explained thanks

  • @user-uc3gm2ke1e
    @user-uc3gm2ke1e 11 місяців тому

    thanks for video! :)

  • @aorlim
    @aorlim Рік тому

    Great Video

  • @bsteven93
    @bsteven93 3 роки тому

    Great tutorial. I was having a issue with my tiles generating as huge blocks you showed me what I need to change to fix that. Thank you very much!

    • @samyam
      @samyam  3 роки тому

      Awesome! 👏

    • @EsportsPoptart
      @EsportsPoptart 2 роки тому +1

      You need to adjust the "Pixels Per Unit" Size on the textures from 100 -> 1024 on each sprite you want to add to the tile pallet.

  • @Kromahtique
    @Kromahtique 3 роки тому

    Thank you!

  • @edjemonkeys4896
    @edjemonkeys4896 2 роки тому

    Thanks!

  • @akaaidan5720
    @akaaidan5720 4 роки тому

    Woah nice vid

  • @ilyasyildiz6091
    @ilyasyildiz6091 3 роки тому

    Bro Thanks for video

  • @playonce4186
    @playonce4186 3 роки тому +1

    I was looking at how to get those tiles at the perfect square and with the anchor set to 0 it worked thanks!

  • @rafaelache8650
    @rafaelache8650 Місяць тому

    good video thanks

  • @DanTheMan-rr3yg
    @DanTheMan-rr3yg 2 роки тому +1

    FYI for everyone, you can actually set the rigidbody to a "static" body type instead of the default of dynamic and setting the gravity to 0 and freezing the coordinates. Unless you want to be able to move tiles during gameplay of course

  • @shagman1779
    @shagman1779 3 роки тому +3

    Thanks a lot! Is there any chance you could make a video showcasing how to code grid-based movement on an isometric map such as this? As in, moving cell-by-cell like in a tactical turn-based game.

    • @samyam
      @samyam  3 роки тому +2

      Great idea! I'll put it on my list for a possible future video. In the meanwhile this video I made on grid movement might help, you might just have to change the direction to move in
      ua-cam.com/video/YnwOoxtgZQI/v-deo.html

  • @katanafamily5064
    @katanafamily5064 3 роки тому +10

    Great video so far, but I'm confused. I know that the Unity engine is constantly changing (as a noob, I at least have THAT much figured out). She keeps saying "X as Y" but I keep seeing "Z as Y". Are these interchangeable and should I assume that older tutorials will show an X instead of a Z?

    • @samyam
      @samyam  3 роки тому +8

      No I just get confused when I see Z and sometimes say X 😂

    • @katanafamily5064
      @katanafamily5064 3 роки тому

      @@samyam ah! Ok thank you! Great stuff!

  • @SophiefromMars
    @SophiefromMars 3 роки тому

    I've followed all the instructions here and on Unity's official tutorial and I still can't get collision to work...
    It'll turn out to be something silly and small that I've missed. It always is...

    • @samyam
      @samyam  3 роки тому +2

      Make sure you followed all the instructions on the video carefully, it can be a bit convoluted with isometric games
      I have have this next video which might help:
      Mouse Click Movement in Isometric Tilemap - Unity Tutorial
      ua-cam.com/video/b0AQg5ZTpac/v-deo.html

  • @retroxify
    @retroxify 2 роки тому

    You keep saying X as Y. I don't think you know what that means. XD
    I'm kidding of course. Fantastic tutorial, thanks so much!

  • @ghriankashtagelenski6577
    @ghriankashtagelenski6577 3 роки тому +1

    I have tried making such a concept a while ago, my main problem was sorting the sprite of the character and tiles when the character was in front or behind an elevated tile, or even under an elevated tile such as a bridge. I managed to make it work with some scripting but the collisions were very funky as a result. Did you address this issue, or is your character unable to stand behind a crate (lower body of the character hidden by the crate) ?

    • @samyam
      @samyam  3 роки тому

      Heres a great article about the concept (using sorting layers depending on position): www.google.com/amp/s/breadcrumbsinteractive.com/two-unity-tricks-isometric-games/amp/
      Lets know if that helps!

    • @jordyncampbell1176
      @jordyncampbell1176 Рік тому

      @@samyam Do you still remember what that article was or know where it was moved to by any chance?? (Or do you have another article or a video on it?) :)

  • @MythozTheMyth
    @MythozTheMyth 4 роки тому +1

    interesting video. is it possible to disable the tilemap renderer completely for the collison layer or does this cause issues?

    • @samyam
      @samyam  4 роки тому +1

      That also works in this case!

  • @pacmanrocks94
    @pacmanrocks94 2 роки тому

    hi, hopefully you still read new comments :). when adding the 'lake', the collider is based on the sprite instead of the square grid, so the collider is actually going "above" (or "below") depending on the y offset. When you move the character around, you can't get close to the lake on certain sides. Do you know how I can fix this?

    • @pedepatopimenta
      @pedepatopimenta 2 роки тому

      Hey dude. What helped me was to go on the assets folder (inside Unity editor), create -> 2d -> sprites -> isometric diamond
      Then I use that new sprite on the collision layer, only the top of the lake will have a collider. I did have to set the "Tile Anchor" back to X=0.5 and Y=0.5
      It may be kinda weird if you are using the same tileset she is, but maybe it works out for ya.

  • @amgames5638
    @amgames5638 Рік тому

    Just a thought, why make a separate "collider" tile and keep the water on the first tileset instead of just making the water a separate tileset with separate colliders?

  • @SlipperyVeins
    @SlipperyVeins 10 місяців тому

    I got a question: let's say the grid is XZY, meaning it's horizontal along Z axis. I'm trying to apply Tilemap Collider to it and since the collider is 2D, it exists only in X and Y. Is there a way to rotate 2D collider or the only solution is to apply a different (3D) collider?

  • @DarkScreen-vh7wy
    @DarkScreen-vh7wy 5 місяців тому

    Boa noite! Você tem algum tutorial ensinando a criar um rpg isometrico pela Unity?

  • @Mystical-TEDDY_
    @Mystical-TEDDY_ 3 роки тому

    Okay so If i have a player and each different elevation is a different sorting layer do I need to just not do that and change the Z values or keep the sorting layers

    • @samyam
      @samyam  3 роки тому

      If you'd like to use the Z value to sort in the correct order, you need to have a Z as Y Tilemap, else you can use the normal isometric tilemap and make sure you have the correct sorting layers.

  • @dinax51
    @dinax51 3 роки тому

    Cool, thanks, however in my case adding the water in the ground layer and selecting Mode to Individual the whole ground looks weird. I have checked previous steps and everything seems to be correct :-(

    • @samyam
      @samyam  3 роки тому

      What do you mean by weird? Feel free to join my Discord and post in the help channel with the issue to get a better idea: discord.gg/SwCKB3Q

  • @random_precision_software
    @random_precision_software 2 роки тому

    Have you a video on how to convert texture to a atlas?

    • @samyam
      @samyam  2 роки тому

      No I do not think I do unfortunately
      learn.unity.com/tutorial/introduction-to-the-sprite-atlas

  • @basiccomponents
    @basiccomponents 2 роки тому

    thanks a lot for this tutorial! Only issue I'm having is that around 11:44 when I create the tilemap collider, nothing happens, do you have an idea of why this could be happening or how could I fix this? Maybe I need to set a Physics 2D Material?

    • @samyam
      @samyam  2 роки тому

      Are you setting the collider on the actual tilemap object? And does the component actually appear on the object or it doesn’t let you add the collider? If it doesn’t let you add the collider maybe you have an error in your game. If it does, then make sure you are selecting the object in the hierarchy to see the green outline, and make sure you have gizmos turned on for the scene view (to see the collider outlines)

    • @basiccomponents
      @basiccomponents 2 роки тому

      @@samyam it lets me add the collider and the rigidbody 2d as in your video, but the green lines don't actually appear and when I run the game my character falls through the tiles

    • @samyam
      @samyam  2 роки тому

      Make sure you freeze the position and rotation in the rigidbody 2d if the tilemap. Also, how are you moving the player? Rigidbody, character controller, etc?
      Maybe these suggestions also help
      answers.unity.com/questions/1786050/tilemap-collider-2d-not-working.html

    • @basiccomponents
      @basiccomponents 2 роки тому

      @@samyam I tried to change the collider type to Grid, it creates a collider, but my character just sits on the border, not in the middle of the tile. I still haven't implemented the movement of the character.

    • @samyam
      @samyam  2 роки тому +1

      @@basiccomponents Hard to tell without seeing what's going on, if you'd like you can join our Discord and post in the #help chat images or a small video of the issue
      discord.gg/bvQEGk7

  • @CanalDojogames
    @CanalDojogames 3 роки тому

    Thank you so much, solved a lot of my problems, honestly it is weird how it works with Upper and lower tile.... kinda make me confused..so i will need to work with layer method instead...
    Whoooah! when i turned the custom axis and y=1 it really works how i wished.... god bless you!
    So how you add all into a single atlas and unity keep them as it is? because re import will cause it to remove from some tilemaps,right?

    • @samyam
      @samyam  3 роки тому +1

      You can just add all of the different tiles you are using into the atlas, Unity will just issue draw calls from the atlas instead to save on performance. Here is the workflow for using a Sprite Atlas docs.unity3d.com/Manual/SpriteAtlasWorkflow.html

    • @CanalDojogames
      @CanalDojogames 3 роки тому

      @@samyam thank you very much

  • @TheAmeer3881
    @TheAmeer3881 3 роки тому

    Smart gal

  • @DragonByte79
    @DragonByte79 3 роки тому

    I asked me, why do the other grids have a collider as well? Do not only have the collider grid have a collider, so we can walk on?

    • @samyam
      @samyam  3 роки тому

      We want to know where the player can walk, so we place colliders on the non walkable areas to query whether we can walk in that direction as well

    • @DragonByte79
      @DragonByte79 3 роки тому

      @@samyam that makes sense. I tried it but had a problem accessing my ground tiles. My player was outside of the grid and tried to move on it and it collides with it. So that was the reason I asked. After I placed my player onto the grid, it works.
      I have a random tilemap generation so my player was a bit placed off :)
      Thank you for your awesome video.

  • @youtuberyoutuber2495
    @youtuberyoutuber2495 3 роки тому

    can you make a tutorial on how to make a pseudo-isometric map like on SimCity 3000?

    • @samyam
      @samyam  3 роки тому

      Is that like 3D made to look like an isometric 2D game?

    • @youtuberyoutuber2495
      @youtuberyoutuber2495 3 роки тому

      @@samyam Im not sure :D but there's plenty of simcity 3000 images on google

    • @samyam
      @samyam  3 роки тому +1

      Yeah it actually seems it’s fully 2D but looks 3D (2.5D). Thanks! I’ll keep it in mind

  • @mohokhachai
    @mohokhachai 5 місяців тому

    Scene management

  • @christopherdoiron4294
    @christopherdoiron4294 3 роки тому

    why would I chose this over a 3d game and just move the camera up? serious question

    • @samyam
      @samyam  3 роки тому

      It depends on the style of the game. If you have a 3D game you’d need 3D assets and not simple sprites.

    • @christopherdoiron4294
      @christopherdoiron4294 3 роки тому

      ​@@samyam Do you have an example of a 3d game that has top view? I feel like Torchlight 2 and even Diablo 3 are 2D. (2.5D maybe, but not 3D)

  • @ArcWeltraumpert
    @ArcWeltraumpert 3 місяці тому

    it's any tutorial like this using godot?

    • @samyam
      @samyam  3 місяці тому

      No I don’t have any Godot tutorials

  • @voidling2632
    @voidling2632 Рік тому

    set rigidbody rather to static, no reason to have a dynamic one for a tilemap.

  • @mohokhachai
    @mohokhachai 5 місяців тому

    Dungeon architect asset