Game Development Reference
In-Depth Information
Arranging GameObjects
Typically, when you are creating an environment with a lot of duplicate geometry, you will import the
original and then make duplicates of it in the scene. Although it doesn't reduce the overhead during
runtime, it does reduce disk space, or in this day and age, download time.
The end result is that the modular asset must be arranged in the scene. To help with that task, Unity
has a very nice vertex snap feature.
1.
Arrange the view so that you can see all three cubes easily.
2.
Select Cube1.
3.
Hold the v key down on your keyboard, and move the cursor
around the cube.
The transform gizmo jumps to the closest vertex.
3D MESH COMPONENTS
If you are new to 3D, you might not know that mesh objects have three component parts: vertices, edges, and tris
(short for triangles ). A triangle, sometimes called a face , is the smallest surface that can be rendered. It is defined by
three vertices and the three edges that connect them (below, left). Unless you are using a two-sided shader (a “shader”
contains the code that tells the graphics hardware how an object is drawn on screen), faces are only “drawn” or
“rendered” on one side, their face normal side. The “normal” is an imaginary line perpendicular to the face that indicates
its “outward” or visible side (below, right).
4.
When the cursor snaps to the lower vertex closest to the next cube over,
press and hold the left mouse button, and then drag it over to the next cube.
5.
With the mouse button down, move the cursor around the target cube and
watch the original vertex snap to its new target.
6.
When you are happy with the alignment, let go of the mouse button to finalize
the arrangement.
7.
Repeat the process with the third cube in the row or stack you started with
the first two.
 
Search WWH ::




Custom Search