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

Creating a humanoid ragdoll with the ragdoll wizard


In this recipe, we will turn our character into a ragdoll and learn how to enable the ragdoll and disable it. We will use Unity's built-in Ragdoll Wizard, which is useful for creating humanoid ragdolls:

A character with the ragdoll effect applied

Getting ready

For this recipe, we need an animated character. We can use the one we were using before (for instance, the one from the Chapter 4Character Movement). You can also go to the Chapter 09 Physics and animations\Recipe 04 Creating a humanoid ragdoll with ragdoll wizard directory. You can find the Example.unity scene there. If you play the game and press the space bar, the character will turn into a ragdoll. You can press the space bar again to turn the ragdoll off.

How to do it...

To create a humanoid ragdoll, follow these steps:

  1. Place your character in the scene.
  2. Go to Game Object3d ObjectRagdoll to open the Create Ragdoll window.
  3. Drag and drop the bones from your character rig to the...