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 - set up the camera rig

There are at least two ways we can handle the HallwayCam's animation. We can use a Script to control the camera motion, or we can use Unity's built-in Animation tools to record some camera motion that we'll play back during gameplay. We've already done a bunch of scripting, so let's see what the Unity IDE can do to help us pull off our running-through-the-hallway effect without writing any code.

We're going to build a camera rig, where the camera is a child of a Game Object that bounces up and down, and that Game Object is a child of another Game Object that runs through the hallways.

Tip

Order of operations

Because of the way Unity's built-in animations work, it's super important to set up your objects' ...

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