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

Getting up from a ragdoll


This recipe is slightly more advanced but fun to implement. It makes our character use three different rigs: the original animated rig, the rig our character's mesh is skinned with, and a ragdoll. By using these three rigs, we can smoothly blend between ragdoll and animation any time.

Getting ready

Again, we are going to use the same character as in the Creating a humanoid ragdoll with the ragdoll wizard recipe. We will need two getting up animations: one from face facing down and one from face facing up positions. Name them StandUpFaceUp and StandUpFaceDown. We also need at least a looped Idle animation.

You can also open the example Unity project and go to the Chapter 09 Physics and animations\Recipe 08 Getting up from a ragdoll directory. If you open the Example.unity scene there, play the game and press the space bar; the character will fall down using ragdoll. If you press the space bar again, it will blend from a ragdoll to a getting up animation and will be...