Unfolding the map
We are finally ready to place the 2D map in our scene.
In the previous chapter, we have set the resolution to 16:9. Therefore, the maps that we will find in our packages are ready to use.
Let's start by dragging the sugar_mountain_map
Sprite from the Graphics/maps
folder into our scene. We need to place it in (0,0,0). Please note that the z axis is set to zero.
It is a perfect map for what we need. For example, on the left side, there is the beginning of the path that the sweet-tooth pandas will follow. At the end of the path, there is the Sugar castle that the player needs to protect. Furthermore, there is enough space at the top to implement our user interface in Chapter 3, Communicating with the Player - the User Interface.
The next step is to modify the camera settings. What we want to do is to fit the entire map in the Camera view. To achieve this, just modify the Size properties to 22.5
as shown here:
As a result, our map will be perfectly centered in the Camera view....