Reader small image

You're reading from  Unity 5.x Animation Cookbook

Product typeBook
Published inMay 2016
Reading LevelExpert
PublisherPackt
ISBN-139781785883910
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Maciej Szczesnik
Maciej Szczesnik
author image
Maciej Szczesnik

Not interested. Too busy with current game project. Source: Linkedin.
Read more about Maciej Szczesnik

Right arrow

Synchronizing an animation with objects in the scene


In this recipe, we will synchronize a character's animation with an object placed in the scene. This is again a common mechanism used in games.

Getting ready

To follow this recipe, you need two animated game objects: a character and an interactive object. In our example, we use a wheel lever that the character can rotate. We use only two animations, WheelStart and WheelLoop, for both the Character and the Wheel objects. The animations have the same number of frames and are synchronized in a 3D package already. You can also open the provided example Unity project and go to the Chapter 05 Character actions and expressions\Recipe 06 Synchronizing an animation with objects in the scene directory. You will find an Example.scene there. Play the game and press the space bar to see the Character and the Wheel play a synchronized animation. You will find all the necessary animations in the Rigs directory.

Character and Wheel objects playing synchronized...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Unity 5.x Animation Cookbook
Published in: May 2016Publisher: PacktISBN-13: 9781785883910

Author (1)

author image
Maciej Szczesnik

Not interested. Too busy with current game project. Source: Linkedin.
Read more about Maciej Szczesnik