To know
First of all
Enable Gizmos in Game View
Build project
Remember that you will get errors if you try to compile your project with 2.5dTK installed. The UnityEditor namespace is completely removed when building the app and this will not allow building.
Bake mesh
When the camera rotation or its Y axis is very low you may have difficulty baking the mesh. Furthermore, Unity’s new navigation system locks the Radius to a minimum of 0.05.
To get around these obstacles you can use Navigation (Obsolete).
Horizon line
The position of the yellow horizon line changes according to the settings assigned to the camera (on the Y axis and on the rotation) and to the FOV. The minimum and maximum limits of these settings are handled by 2.5dTK. If there are any objects in the scene (areas, 3D and 2D objects) the horizon must not collide with them otherwise the objects would be displaced from their original position.
If you come across this limitation you should know that:
increasing the FOV the horizon lowers, decreasing it the horizon rises, but increasing the rotation the horizon rises and decreasing it the horizon lowers.
So if you need to decrease the rotation but objects in the scene are preventing you from doing so, you simply decrease the FOV enough to see the horizon rise and then you can decrease the rotation. The same trick goes for all combinations.
Mouse functions
Note: to draw, you do not need to hold down left mouse button.
Creating areas
- Left click
- Drawing: insert a new vertex.
- Over spot (vertex): select to move
- Right click
- Drawing: show/hide tracking line.
- Over area edge: insert a new vertex.
- Middle click
- Over spot (vertex): remove spot.
- Double click
- Over area edge: select area.
Creating environment
- Left click
- [Tab Scene]: (with meter setting enabled) Over area edge: show / hide length.
- [Tab Navigation]: (Multi-Level scene) Single click for Set vertical line
- [Tab Navigation]: (Multi-Level scene) Draw cross line
- [Tab Objects]: move object.
- Right click
- [Tab Scene]: move Character.
- [Tab Navigation]: move Character.
- [Tab Navigation]: (with Connect vertices enabled) Over spot: select spot
- [Tab Navigation] (with Select vertex enabled) Over spot: select spot
- [Tab Objects]: move Character.
Spot and Line radius settings
These are very important settings and you should keep an eye on them constantly if you change the camera settings significantly.
When you hover over an area with the cursor, it lights up. Double-clicking on an edge of it will make it active.
These settings allow you to set the minimum distance for the edges or vertices of the area to react to mouseover.
These settings change depending on whether you’re working in Game View or Scene View.
To work well, keep these ranges large enough, but make sure that when you pass the cursor over a vertex, the neighboring one does not light up as well. If two spots are lit at the same time and you perform an operation like moving or deleting it, it is not guaranteed that the function will be applied to the vertex under the cursor.
Initialize GameObjects in scene
To initialize the objects they must be dragged into their fields from the Project folders. This is because they will be adapted to the needs of 2.5dTK.
For the sprites, a parent empty gameobject will be created with a Sphere Collider and the ObjectControl script, needed to manage it with the 25dTK tools.
Two scripts, ObjControl and CharCtrl, will instead be added to the character.
Once created and set up, to manage them they will have to be dragged from the Hierarchy into their fields. By dragging the same object from the Project folders we will obtain copies that are all independent of each other.
Create mesh
To create mesh drag VBAreaTK (child of 2.5dTK) into the Area field and click Create mesh. The bottom option Don’t destroy on save lets you decide whether to keep the mesh in your scene or not. You will find the mesh in 2.5dTK/Resources.
Note: Dragging the main VBAreaTK will result in a single merged mesh consisting of all areas drawn but you can also create individual meshes from each area.
Multi-level environment
You can create very complex environments by assembling planes in Scene View (see Multi-level environment chapter).
In the Options section you will find the Use planes in Scene View item. By enabling it you will be able to draw your areas on different levels represented by planes. Keep in mind that many features of the 2.5d Toolkit will not be available. Objects will need to be placed directly in Scene View.
Update: From version 3.1 it is possible to create multilevel environments without using planes.
Big sprites
Using large sprites allows you to work much easier and faster than using small sprites. These sprites are the same size as the background image and you can prepare them using a good graphics program.
When you move the large sprites you will see that it will cover exactly the part of the background image from which it was cropped wherever you move the cursor. You will not need to move it on the X axis but you will only have to refer to the Z axis. Its placement is immediate.
Watch this video to learn more about creating large sprites and placing them (v2 03 – 2 5D Toolkit: A way to place sprite with just a click in one second).
Keep in mind that 2.5d Toolkit has changed since then but the basic steps to create a scene are still the same.
Tips
Objects
- For all 2D images: select them one by one in Project folders and in Inspector change Texture Type field from Default to Sprite (2D and UI), Sprite Mode: Single, Pivot: Bottom. Apply change (see the settings of the sprites provided in the demos).
- All 2D and 3D objects can be moved away from the floor by setting the Y value (e.g. if you want to hang a picture on the wall or place an object on a table).
- After placing an object remember to click Empty Object or you may unintentionally move it by clicking in the scene.
- 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.
Camera
- A 2.5D environment generally does not require a high FOV. Moreover, many images will need camera rotation which with a high FOV will contribute to character distortion on the screen sides.
- To reduce the depth of the scene, increase the rotation of the camera (taking into account the environment where the character moves).
Scene
- In perspective projection use the meter function combined with the number of steps suggested by the script to get a realistic environment. Example: One step generally covers 65/80 centimeters. The character travels a distance of 10 meters with 15 steps. We divide 10 by 0.70 and we get around 14. It is fine. If the difference is minimal we can slightly adjust speed that will change steps number but if the difference is excessive we must consider reshaping the scene.
Areas / Mesh
- When creating areas make sure vertex or edge of one does not touch those of another area.
