Game Development Reference
Unity Hands On
Getting Comfortable behind the Camera
Step 1. Download Chapter Two/CameraPlay.zip from the Web site,
unzip, and open in Unity. In the Project, double-click on street of the
Scenes folder to open the scene. The Scene will appear with a row
of medieval houses on a terrain.
Step 2. Modify the window tabs if necessary to enable viewing of
the Game and Scene at the same time. Select Main Camera from the
Hierarchy. Zoom in or out in the Scene so that the camera and its
frustum are in full view. If you can't find the camera, double-click
on it in the Hierarchy to bring it into the center of the Scene.
To set the Game view camera to look at the environment from
the same location set in the Scene, select the Main Camera in the
Hierarchy and GameObject > Align with View from the main menu.
This repositions the camera to be looking at the scene from your
point of view.
To move independently around in the Scene, leaving the camera
where it is, hold down “Q” and drag the mouse to pan and hold
down “ALT” and drag the mouse to rotate.
Step 3. Locate the Camera component for it in the Inspector. Find the
Field of View slider. Move the slider forward and back to change the
viewing angle. Take note how the frustum is affected in the Scene
and the resulting Game view.
Step 4. Set the Field of View to 60°. This is a popular setting for the
FOV in many games. This setting is half the total viewing angle. In this
case it gives you 120°.
Step 5. Change the Far clipping plane to 90. Note that half of the
background trees are missing in the Game. This is because they are
now beyond the far plane and outside the frustum. The background
color you see is set by the Background property in the camera
Step 6. To watch the effect of changing the far plane distance
continually, place the mouse over the word Far, hold down the right
mouse button, and drag it left and right to decrease and increase the
value in the Far box. This method can be used for changing the values
of most properties in the Unity Editor.
Step 7. Now, do the same for the Near clipping plane and observe
how the view in the Game is modified.
Step 8. Change the camera to Orthographic by changing the
Projection property of the Camera component. Try modifying
the size property to see how it affects the Game view.