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 sprite sheets to animate particles


We can add sprite sheetanimation to Unity's particles to make them more interesting. This concept is especially useful for various explosions and magical effects.

Getting ready

To follow this recipe, we need an animation exported as a sprite sheet. If you want to know how to create a sprite sheet animation, you can read the Exporting a 2D sprite animation from a 3D package recipe in Chapter 32D and User Interface Animation, where you can find an example sprite animation.

Example sprite sheet animation

You can also open the provided example project and go to the Chapter 07 Special effects\Recipe 07 Using sprite sheets to animate particles directory. If you open the Example.unity scene there and play the game, you will see a particle system with explosions using sprite sheet animation. You can find the necessary sprite sheet in the Rigs directory.

 

How to do it...

To use sprite sheets for particles animation, follow these steps:

  1. Import the sprite sheet texture...