Game Development Reference
In-Depth Information
8. Inside are two objects called Prefabs. Prefabs are combinations of artwork, colliders,
scripts, sounds, and other assets that are put together in working game objects and
saved for later reuse. The two prefabs in this folder are the First Person Controller
and the Third Person Controller.
9. Drag the First Person Controller object from the Project view and into your scene on
top of your ground slab. The controller should be placed on top of the slab by default,
though you can use the move tool (W key) to move it as you like. Move the First
Person Controller to a position at one end of the slab; that is where this player object
will start. Also make sure that the controller is above the ground mesh, because it
will fall through the block and into oblivion otherwise.
10. Click the gray cube at the center of the Scene gizmo to reenter perspective view. Note
its file location in the Standard Assets folder as seen in the Project view. LMB-click to
select the First Person Controller if it is not already selected. Press the F key to focus
the Scene view on this object (see FigureĀ 9.7).
FigureĀ 9.7
The First Person
Controller
Let's take a moment to look at the First Person Controller and understand how it
works. The first thing you will notice about this game asset is that it is a giant capsule. In
a single-player first-person-shooter (FPS) game, there is often no reason to have a high-
polygon player character, so the capsule is a good stand-in.
In the Hierarchy menu there is an arrow next to the First Person Controller object.
LMB-clicking this arrow shows the controller's child objects, which consist of the Graphics
object and a Main Camera object. The Graphics object is the capsule mesh itself.
Search WWH ::




Custom Search