Animating the camera

Dead Keys needs a first-person camera that's effectively on rails. The camera must slowly follow a predetermined path through the scene; its staggered movement from one location to the next is a sign of player progress. So far, a set of specific waypoints have been created (in the previous section), defining locations the camera stops at on its journey to engage with the oncoming zombies.

To create this motion for the camera, multiple animations must be created, one for each journey between waypoints (one for A to B, another for B to C, then another for D to E, and so on). Before creating the animations, however, it's important to structure your object hierarchy for the camera, as needed. Changes to your object hierarchy ...

Get Mastering Unity 2017 Game Development with C# - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.