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.
2. Now click on your animation file and click on Generate Root Motion Curves.