Game Development Reference
In-Depth Information
The playable level
We will create the level that we will play in. We will start off with creating just one
level; once we start playtesting, we will clone the scene to make them. To make this
simple, I'm using the scene from
Chapter 5
,
Enemy and Friendly AIs
and naming it
Chapter 10_a
. Doing this will give us a playable environment, as well as an en-
emy. Now, delete the main camera that is in the scene and drop in
First Person
Controller
.
If you run the scene, you will see that the skeleton is tiny! This is because of its scale
when it is imported to the engine. In the
SkeletonData
folder, click on the skeleton
model. You will see the
Inspector
window open with the imported model data. In the
Scale Factor
property, change its value to
0.0225
; this should make the skeleton
look bigger. This value is the one that I am using, but feel free to use any value that
looks good to you and fits the scene.
Now we need to make a few GameObjects and prefabs. First, we will create a gun
for our player. Drop a cube primitive and scale it into a skinny rectangle. Move it up
to the camera and place it where a gun typically is in an FPS. In the
Hierarchy
win-
dow, drag the
Gun
object and drop it on the main camera; this will force the gun to
rotate with the camera. This is what the gun looks like on my
First Person Control-
ler
object: