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

Using root motion to steer a character


In this recipe, we will use animations to move and steer our character.

Getting ready

To use root motion for steering, you need to prepare a character with at least four animations: Idle, WalkForward, WalkLeft, and WalkRight. WalkRight and WalkLeft should make the character walk in circles (clockwise and counterclockwise). You don't need to create a full circle, just make sure that the start and end poses of the animation look similar. As always, all the animations should have contact points of the feet in the same normalized time. Make sure not to switch the left and right foot. If you start the WalkForward animation with the left foot forward, both WalkLeft and WalkRight animations should also start with the left foot forward, as shown in the following screenshot:

Steering animations using root motion

You can also use the example project; go to the Chapter 04 Character movement\Recipe 03 Using root motion to steer a character directory. You can find the...

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