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 animations for better looking transitions


You've probably already noticed that sometimes when our character stops walking, it blends to the Idle animation in a strange way (with sliding feet). That is mostly visible when legs in the Walkanimation are in a pose that looks like a mirrored Idle pose. We are going to fix this problem in this recipe.

Getting ready

You should use the same character as in the previous recipe and prepare one additional animation that will be a transition from a mirrored Idle pose to a normal Idle pose. You can also go to the Chapter 04 Character movement\Recipe 04 Using animations for better looking transitions directory and open the Example.unity scene. You will find our Humanoid character working the same way as in the previous recipe, but with a ToIdle animation added. You can also find the rig with all required animations in the Rigs directory.

How to do it...

To use additional animations for a better-looking transition, follow these steps:

  1. First, follow all...