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 root motion to create flying characters


We've seen a lot of "hovering" monsters in games in the past, but creatures flying in full 3D space are still a quite fresh and tasty feature. Creating a behavior of such a monster with code is challenging, but we can use animations to make it both easy and great looking.

Getting ready

To create a flying creature in this recipe, we need one animation without root motion, Idle (hovering in place), and nine animations with root motion: FlyingForward (flying straight forward), FlyingForwardUp (flying forward and increasing altitude at the same time), FlyingForwardDown (flying forward and decreasing altitude at the same time), FlyingLeft (flying left in circles-the same way as the WalkLeft animation in previous recipes), FlyingRight (flying right in circles), FlyingLeftUp (flying left in circles with increasing altitude), FlyingLeftDown (flying left in circles with decreasing altitude), FlyingRightUp (flying right in circles with increasing altitude...