GEOG 497
3D Modeling and Virtual Reality



Walkthrough: Creating a Camera Animation


In this walkthrough, we are going to program a camera flight over the Walker building using Unity's animation functionality similar to what you saw in the video from the previous section. Have the Walker Scene open. For your assignment, you will create this animation for the campus with more buildings. (The building used in these instructions is the Walker building but you might see the name of Old Main in the hierarchy. That's just not using the right name. Hope it wont confuse you).

Initial Placement of the Main Camera

We should only have one active camera called “Main Camera” in the Scene. We will make the Main Camera to be the child of a general container object called “Camera Setups”. The animation for the camera flight will be defined for the parent object (Camera Setups) and applied to all its child entities. So use “GameObject -> Create Empty” to place the container GameObject in the scene. Change the name from “GameObject” to “Camera Setups”.  (The image belongs to the scene with Old Main. In your Scene with the Walker building, you don't have the FPS Controller)

Screenshot Hierarchy menu
Credit: Unity

Finally, drag the “Main Camera” object onto “Camera Setups” so that it becomes a child of it. This is how things should now look in the Hierarchy Window:

screenshot hierarchy menu
Credit: Unity

Now we have to place the camera in a good starting position for our camera flight. We want the camera flight to start a little bit away from the Walker building, and then move towards it before transitioning into an orbit around the building. So move the Scene view to a perspective similar to that shown in the screenshot below. First, set the position of both the parent object “Camera Setup” and its child object “Main Camera” to 0,0,0. Then manipulate the location and rotation of only the parent object “Camera Setup” to move both objects at the same time to a location you desire. If you did everything correctly, the Main Camera Position and Rotation values will all still be zero as in the screenshot below because they are measured relative to the parent object.

Screenshot Main Camera Position and Rotation values at zero
Credit: Unity