Hey guys, it’s Nir.
This tutorial is about creating 2.5D games in unity.
In this part, we will create a basic 2.5D environment,
And in the next parts
we will create 3 shaders that will enrich our 2.5D game.
2.5D games come in many flavors.
A popular approach is to use a 3D environment and assets
but limit the player movement to only two axes. 
Another method would be to use 2D assets
while exploiting the third dimension only for its parallax effect.
In this tutorial, we will choose a different approach,
we will use 2D assets while retaining all three axes of movement.
Let’s start by creating a new Unity project.
For this tutorial, we are using version 2019.3.
Be sure to select the Universal Render Pipeline template.
A link to the GitHub project is in the description.
The first thing is to add a ground plane.
While you may use a more complicated mesh,
we will use a simple plane.
Import 2D textures and configure them as Sprites.
Set the Pivot property to Bottom.
We can now place a couple of objects.
When we play the game, the objects look squished.
To fix that,
we need to rotate the object’s X-axis by 45 degrees.
The next step is to rotate the camera
as well by 45 degrees on this X-axis.
You can now move the camera to see the full scene.
It's important to keep the rotation as-is,
but feel free to change the position on any axis.
I created a scene and added a character Danielle created.
While there are only left and right animations,
the character can walk in any direction.
You may notice some depth glitches,
we will create a shader to fix it in the next part.
So, why have we chosen 45 degrees instead of another value?
The following scene with 60° appeared flat,
so it was easy to reject.
In contrast, the 30° scene felt right,
although there are a couple of drawbacks compared 45°:
The first issue is the large field of view,
requiring bigger worlds and details.
Another issue is the simpler computations,
as we will discuss in future parts of this tutorial.
Another thing we need to do is to create colliders.
Even though our assets are angled,
we should create the colliders orthogonal to the ground.
This approach will save us
from a couple of issues down the road.
For groups of objects,
I like creating a custom collision mesh.
It prevents the players from getting stuck between objects.
You can see a tool I created
to speed the process by drawing a shape.
I will create a tutorial for it –
so be sure to subscribe if it interests you.
We now have working collisions,
and ready to move on to the last topic.
So here is our character exploring, and... ahh...
a banana.
Notice that when the banana rises
it seems like it goes towards the camera.
We can fix it by pushing the Z-axis
by the same amount as the Y-axis.
In the next parts,
we will create shaders to fix and enrich our 2.5D game.
Be sure to subscribe so you won't miss
the next parts and other tutorials.
