Adding a cube

Let's now add an object to the scene: a unit-sized cube:

  1. Within the Hierarchy panel, use the Create menu and choose 3D Object | Cube. (The same selection can also be found in the Main Menu bar GameObject dropdown).

A default white cube is added to the scene, centered on the ground plane at position (0, 0, 0), with no rotation and a scale of one, as you can see in the Inspector panel. This is an object's reset transform setting.

The Reset Transform values are position (0, 0, 0), rotation (0, 0, 0), and scale (1, 1, 1).
  1. If for some reason your cube has other transform values, you can set new values in the Inspector panel, or locate the small gear icon in the upper-right of the Inspector Transform component. Click it and select Reset. Its local center is the center of the cube.

This cube has dimensions of one unit on each side. This can be an arbitrary unit that you can choose depending on your application's scale, whether meters, inches, or even miles. But as we'll see later, when you are using physics, it is best to define that one unit in Unity corresponds to one meter in world coordinates.

Your scene may look like this:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset