Book Image

Mastering Unity 5.x

By : Alan Thorn
Book Image

Mastering Unity 5.x

By: Alan Thorn

Overview of this book

Mastering Unity 5.x is for developers wishing to optimize the features of Unity 5.x. With an in-depth focus on a practical project, learn all about Unity architecture and impressive animation techniques. With this book, produce fun games with confidence.
Table of Contents (16 chapters)
Mastering Unity 5.x
Credits
About the Author
Acknowledgment
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Animating the camera


Dead Keys needs a first-person camera that's effectively on rails. The camera must slowly follow a pre determined 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 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, then another for B to C, and then another for D to E, and so on). Before creating the animations, however, it's important to first structure your object hierarchy for the camera, as needed. Changes to your object hierarchy after creating an animation can invalidate how the animation works. I've used several empty objects nested in parent-child relationships, with camera objects as children, to create an organized and structured hierarchy. It takes the form...