Honkbark studios menu logo

Local animations with mecanim

Local animations with mecanim

Please share this post with your friends

While playing around with simple animating in unity5 i discovered i needed to have a local animation. One that does not manipulate the objects position in the world space. Before Unity5 this could be achieved by adding an empty GameObject as a parent to the one that is going to be animated, and that would do the trick. But in Unity5 the same behaviour can be achieved by using Apply root motion without a parent object. When you are done with your animation this is activated by two simple steps:

This technique is used in Friendsheep.

1.  Check the Apply root motion checkbox on the GameObject that is supposed to be animated.

Skärmavbild 2015-04-23 kl. 16.19.51

2. Now click on your animation file and click on Generate Root Motion Curves.

Skärmavbild 2015-04-23 kl. 16.22.41

Categories: Tutorial,Unity3D