Game Development Reference
In-Depth Information
Note that Unity is a Y-up program, meaning that it recognizes Y as the axis that points
upward. Blender and Autodesk® 3ds Max® utilize the z-axis as their upward axis, while Maya
utilizes Y like Unity. There are options when exporting FBX files from your 3D modeling soft-
ware for converting models to ones that recognize Y as the upward axis.
3. Using the Create menu in the Hierarchy view, add a cube to your scene; it should
appear in the center of the Scene view. This cube will form the ground slab for a
hallway in your level.
4. Choose Edit b Snap Settings. A new window will pop up with various numerical
units for Unity's transform tools to snap to. Change the Scale setting to 1.
Remember that one Unity unit is equal to one meter of actual distance. When scaling objects
in the program, take this into account. Also note, however, the golden rule of first-person
game perspective: always make environments slightly larger than they would be in real life
to compensate for the camera's narrow field of vision.
5. Press the R key to switch to the Scale tool. In Unity, the shortcuts for the basic trans-
form functions—move, rotate, and scale—are W, E, and R, respectively. With the
Scale tool activated, hold down the Ctrl key if you are using Windows and the
Cmd key if you are using a Mac; this will allow you to transform the cube with Snap
activated. Scale the cube along the red x-axis until it is 6 units wide.
6. Now scale the cube along its z-axis (remember that Z is forward and Y is up in
Unity) until it is 30 units long. You can do this either with the Scale tool and snaps
in the Scene view or by using the transform text entry fields in the Inspector view
(Figure 9.6). Congratulate yourself; you've just scaled your first ground slab in your
Unity scene.
7. In the Project view, open the Standard Assets folder that you imported from Unity.
Inside you will find another folder called Character Controllers . Open it.
Figure 9.6
Scaling your first
ground slab in your
Unity scene
Search WWH ::




Custom Search