Book Image

Unity 5.x Animation Cookbook

By : Maciej Szczesnik
Book Image

Unity 5.x Animation Cookbook

By: Maciej Szczesnik

Overview of this book

This recipe-based practical guide will show you how to unleash the power of animation in Unity 5.x and make your games visually impeccable. Our primary focus is on showing you tools and techniques to animate not only humanoid biped characters, but also other elements. This includes non-humanoid character animation, game world creation, UI element animation, and other key features such as opening doors, changing lights, transitioning to different scenes, using physics, setting up ragdolls, creating destructible objects and more. While discussing these topics, the book will focus on mecanim, the Unity 3D animation tool, and how you can use it to perform all these tasks efficiently and quickly. It contains a downloadable Unity project with interactive examples for all the recipes. By the end of this book, you will be confident and self-sufficient in animating your Unity 3D games efficiently.
Table of Contents (17 chapters)
Title Page
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Using the Animation View to animate the camera


In this recipe, we will create camera animation using Unity's built-in Animation View:

Simple vertigo effect created with the Animation View

Getting ready

We don't need anything fancy for this recipe as we will create it from scratch in Unity. You may need some decorations in the scene though. You can also open the provided example Unity project and go to the Chapter 08 Animating Cutscenes\Recipe 01 Using the animation view to animate the camera directory. You can find an animated Camera (1) game object in the Example.unity scene there. If you play the game, the camera will play an animation.

How to do it...

To create camera animation with the Animation View, follow these steps:

  1. Select the camera you want to animate (you can also add a new camera to the scene).
  2. Open the Animation View (go to WindowAnimation).
  3. Create a new Animation Clip and call it CameraAnimation.
  4. Make sure the record button is pressed.
  5. Move and rotate the camera to create the desired...