Book Image

Unity Animation Essentials

By : Alan Thorn
Book Image

Unity Animation Essentials

By: Alan Thorn

Overview of this book

Table of Contents (14 chapters)
Unity Animation Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Fixing motion offsets


A common problem when importing root motion animations into Unity is related to offsetting. To see this problem, play the walking animation scene you've just created, or load it from this book's companion files in the Chapter05/char_anim_walk_start folder. When you play this project and observe the character walking with root motion enabled, you'll see that not only does he walk forward in the scene, but he gradually wanders or moves off course. This is because he's not walking in a completely straight line. There's a degree of wander, or offset, that causes his path to deviate slowly over time. This isn't especially noticeable at first, but across larger spans of time, it's possible for a character to wander dramatically from its original path.

Root motion deviation

This problem is not scene- or character-related, but is embedded inside the animation root motion. To fix it, you should select the animation file in the Project Panel to display its properties. For the sample...