O'Reilly logo

Unity 3D Game Development by Example by Ryan Henson Creighton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action - haul in the hallway

The assets package contains a hallway model. Created in the free 3D software package Blender, it's essentially a square donut with the normals flipped so that it appears inside out.

We're going to set up one camera to bounce up and down, as if the character is running, and send it flying through the hallway. Then we'll set that view as the background for our Main Camera, which is aimed at the heart-and-tray action. By using Depth as our Clear Flags setting on the foreground camera, the background camera will show through the empty space.

  1. Find the hallway model in the Project panel.
  2. Drag the hallway model into the Scene.
  3. Adjust the hallway's Transform properties in the Inspector panel:
    • Position: X:0, Y:2, Z:-25 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required