Game Development Reference
In-Depth Information
Attached to the Main Camera object is the Mouse Look script, which allows the
camera to follow the motions of the player's mouse. This, along with the FPS Input and
Character Motor scripts attached to the parent First Person Controller object, create the
classic FPS control scheme in Unity. Note that each of these scripts has variables that can
be tweaked. These variables control things like run, jump, and look speed, among others.
Also note that should a visible FPS character be required, it is possible to construct the
FPS controller by attaching the same script combination to your own model.
Now, let's complete the hallway blocking:
1. Add a new cube and enter a front or side view of your objects by clicking an arrow on
the Scene gizmo.
2. Press the W key to enable the transform tool.
Hold down the V key to enable vertex snapping.
Hover your mouse over a lower corner of the
new cube; then click and drag that corner to
move the new cube to one of the upper corners
of the floor slab, as shown in Figure 9.8. This
corner will be viewed from inside so arranging
objects this way will prevent the computer from
processing unnecessary overlapping polygons.
3. Now that you've placed the block, use the scale snaps and vertex snaps to make this
block as long as the floor slab and about 4 units tall.
4. Use Ctrl+D or (Cmd+D) to duplicate the wall and move it to the other side of the slab.
Also duplicate the floor slab to create a ceiling and block of the end of the hallway
near your FPS controller with a new wall. As you create more blocks, you may want
to enable the Tex - Wire display mode in the Scene view.
Whiteblock levels can also be quite useful for drafting lighting, as this next exercise
shows:
1. Create a point light near your player controller using the Hierarchy view's Create
menu. With the light selected, the Inspector view shows its components.
2. Make the light a dark orange to brown color and give it an intensity of 0.5. This will
create a creepy, emergency light-like feel, as shown in Figure 9.9.
3. To finish, use three cubes: two at 2 units along the x-axis, 4 units along the y-axis,
and .5 units along the z-axis, and one at 2 units along the x-axis, 1 unit along the
y-axis, and .5 units along the z-axis. Then create a doorway at the other end of the
hallway, as shown in Figure 9.10. This will finish your interior whiteblocking.
Now that you've got the feel of whiteblocking with a simple hallway, you will use these
tools to complete a simple town square with some environmental embellishment.
Figure 9.8
Moving objects with
vertex snaps
Search WWH ::




Custom Search