Isometric 2D games has become a trend in todays games, and here I will show you one of the easiest way to implement isometric 2D (aka 2.5D) in Unity 2D.
Here we have regular 2D tiles which we want to make into 2.5D instead. Our plan is simply to change the camera angle so this becomes isometric instead.
Step 1) New GameObject “target”
Create a new GameObject “target” and place your current Main Camera as a child of the newly created “target” as such:
Step 2) Change rotation of Main Camera
Change the rotation of the Main Camera to x = 45 like this. It is also important to keep the Main Camera in an Orthographic projection. Simply follow the settings below and you’ll be good.
NB: The most common angle used is 60 degrees. This creates a 2:1 ratio which is the most conventional ratios in isometric 2D. I simply use 45 degrees because i think 60 becomes too steep, but its completely up to you!
Step 3) Change rotation and position of “target”
Change the rotation of your new GameObject “target” to z = 45. If you have any kind of Camera Controller Script that controls camera movement, zooming etc. you have to move that script to the “target” object instead of the actual Main Camera like this:
You should also change the z position to -20, if not this can happen:
Step 4) DONE!
When you have placed you camera in this angle you can still work on the game from a top-down / regular 2D perspective, while your game is running in 2.5D.
In the two bottom pictures here you can also see that when creating images you want to have in your game, you have to create extra high images and rotate them in-game (45 degrees). The new camera angle makes the white block a lot shorter than it really is.
Thanks for reading!