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 wind emitters to create motion for foliage and particle systems


Unity supports wind emitters with which we can create realistic effects for foliage and particles. Using them is really simple.

Getting ready

To follow this recipe, you need to have a particle system and a tree created with Unity's built—in Tree Creator. You can open the provided example project and go to the Chapter 07 Special effects\Recipe 06 Using wind emitters to create motion for foliage and particle systems directory. In the Example.unity scene there, you can find a tree and a simple particle system (falling leaves). Play the game to see the tree and particles moving with the wind.

Tree with a falling leaves particle system. Both animated with a WindZone

How to do it...

To use Unity's wind, follow these steps:

  1. Place the tree and the particle system in the scene.
  2. Create a new WindZone. To do so, go to the GameObject3D ObjectWind Zone option.
  3. The tree will move when you play the game, but the particle system needs to...