Demo NICOHOME Orthographic

The steps for creating an orthographic scene are mostly the same as for a perspective scene.

Refer to the NICOHOME Perspective Demo chapter. In this chapter we will discuss only the few differences between the two projections.

First of all, it will not be possible to change the size of the camera which is fixed automatically by the script according to the size of the background image. To change the size of the areas and the depth of the scene you will have to act on the rotation of the camera but as you will see a small rotation will significantly change these values.

The meter function will not be available. To get the right camera setup you’ll need to look at the shape of the areas in Scene View and test character movement in Play Mode. But it will be easier to do than to explain.

A special mention must be made for the Character settings tab available only in orthographic projection.

We will use the MAINFRAME Demo as an example because the size of the character at the closest point and farthest point are more accentuated than those in the NICOHOME Demo.

This is the opening scene, with the character initialized:

As can be expected in orthographic projection the character maintains its size throughout the screen:

What we have to do is find two distant reference points to be able to set two different dimensions.

In the case of this image we can consider the fire extinguisher positioned on the central column and the one at the back of the room, between the windows.

Select the Character settings tab.

Let’s start by placing the character near the first fire extinguisher and resizing it.

Use Constrained scale to do this. As indicated by the red line, the character’s arms are at the same height as the fire extinguisher handle.

Click on Save point, in the First point section.

The Second point section will appear.

Now let’s move the character to the bottom, near the second fire extinguisher and resize it in the same way.

Click on Save point in the Second point section.

Done. From now on our character will resize according to these parameters. Try moving it around the screen.

Now you can draw your areas, place your objects, change the camera settings and whatever changes you make the character will keep these proportions.

Let’s now see in detail how to set the character’s movement. Once you have set the two different heights as described above, create the walkable area.

Select the Navigation tab, click on New walkable area and draw the area as shown.

Now enter Play Mode.

As you can see from the screenshot the area in Scene View appears excessively long compared to how it should be.

In orthographic mode we do not have the meter tool available.

Let’s start by establishing how deep our scene is. Let’s assume 18 meters.

In the 2.5dTK inspector we write this value in the Meters field. Considering a step length of approximately 0.65m we obtain from 23 to 33 steps to cover a distance of 18m.

The first thing we need to do is to set the character’s walking speed at the closest point and at the farthest point.

Dragging the character with the right button places it at the beginning of the area on the left. Then click on the opposite point to observe how it walks.

Using the 2.5dTK controls set Closest walk speed. A fair value might be 6.5.

Now drag the character to the bottom of the area and repeat the same thing setting Farthest walk speed.

A good value might be 1.3.

Now drag the character to the closest point of the area and click at the bottom of it to make the character walk. As you can see it is still very far from the bottom of the area after 33 steps.

The solution is simple: click on View environment from top and slowly rotate the camera. You will see the area shorten. Stop at about 4 and repeat the walking test. This time the character only takes 40 steps to reach the end of the area, but we need to reduce them a little more. After a couple of attempts you will find that with a rotation of 5.2 the character will cross the entire area in 27 steps which is an average value among those suggested.

Now set the running speed in the same way you did for the walking speed. Good values might be 15 and 2.5.

In the image below you can see in Scene View what the area should look like once the settings are complete.

Remember to click Save scene data before exiting Play Mode to save the changes made and once in Edit Mode to click Load scene data.

The Slow down in the distance option should always be enabled because it slows down the walking speed as the character moves away.

The script attached to the character (2.5d Toolkit/Demo/script/CharCtrl) is a simple script that takes care of resizing the character in Play Mode. You can improve it and use it in your games but its purpose is to allow you to have an optimal view of your scene. Probably, if you use assets for game creation, you will be able to find much more effective scaling scripts in them.

Note: contrary to what is shown in the various videos, when you use the 2.5dTK buttons to overlay the sprites on the background image from which you cut them, it is advisable to move them mainly on the X axis and on the Z axis, using the Y axis only if strictly necessary. This is because in this way we will keep the sprites on the same plane as the area that hosts them.

Author: vbgamestudio