In a 2D game there is no real depth. All the object are only aligned on two axes and therefore one surface. In regard of the used camera angle it might be neccessary to create some kind of fake depth so that the player gets a feeling of 3D - or also called 2.5D.
In Unity this can be done very easy based on the Y coordinate. By adjusting the "Transparency Sort Axis" Unity will handle this for you and your player will be able to be in front and also behind objects on your tilemap.
As long as you are not using complex shapes and structures this simple approach should work in most of the cases. But as it is common with tilemaps: a lot will work, but just not everything. Do no despair ;)
Useful links for other camera angles:
https://docs.unity3d.com/2021.1/Docum...
https://docs.unity3d.com/2021.1/Docum...
https://docs.unity3d.com/2021.1/Docum...
Relevant Videos:
Tilemaps Basics: • Creating Tilemaps For Your 2D Game in...
Tilemap Colliders: • Creating Tilemaps For Your 2D Game in...
Make Your Character Move: • The New Way for Making a Character Mo...
Animate Your 2D Character: • How To Animate Your 2D Character in U...
Customizing Unity: • How to Customize Unity / EASILY SAID ...
Download the Character here: https://opengameart.org/content/16x18...
=========
💬 DISCORD: / discord
❤ SUPPORT ME: / velvary
🎮 PLAY MY GAMES: https://velvary.itch.io/
🦜 TWITTER: / velvary1
💡 ...MORE TUTORIALS: / velvarygames
=========
Timestamps:
00:00 - Intro
00:24 - The Approach
00:48 - Preparations / Requirements
01:45 - ! URP Explanations !
02:06 - Adjusting the Sort Mode
02:39 - Testing The Setting
02:55 - Troubleshooting
03:05 - The Pivot Point
04:55 - Rechecking the Order
05:25 - Further Information
05:45 - Thank you for watching :)