Game Development Reference
In-Depth Information
Figure 2-2. Creating a cube
A cube is created in the center of the viewport.
Transforms
All gameObjects have a Transform component. It keeps track of where the object is in space, what
its orientation is, and if it has been scaled. Unlike the viewport X, Y, and Z global coordinates,
gameObjects can be moved, rotated, or scaled at will. You can transform them in edit mode, and
they can be animated during runtime.
If you have not navigated through the scene view since the project was created, the cube should
have been created at 0, 0, 0. Unlike many Autodesk products where Z is up in the world, in Unity,
Y is the upward direction. You should see your cube with its transform gizmo, specifically the
Position gizmo, clearly visible. The arrows follow the convention of RGB = XYZ, or the red arrow
is the X direction, the green arrow is the Y direction, and the blue arrow is the Z direction. Z is the
direction Unity considers as forward .
 
Search WWH ::




Custom Search