Simple version: Is there a simple way (without scripting) to prevent the animation bounce-back to 0 of non-root motion animations? Or can I add root motion to the animations within Unity? I have a model with in-place animations and can modify them to change positions/rotations easy enough all in Unity but can’t figure out how to keep them from bouncing back to their origin.
Complex version: I’m trying to simplify my movement and animations in a non-humanoid (generic) model. I see in the unity 5.0 tutorial (http://unity3d.com/learn/tutorials/modules/beginner/unity-5/root-motion-authoring) that this should be possible but (doi!) animations should be root animations in the first place. When following the referenced tutorial (around frame 1:06 ish) the “Generate Root Motion Curves” is grayed out for me after making my (non-root?) changes to position/rotation.
My animations to begin with are in-place only. When looking at the Import settings in the Inspector I see the root motion node is set to none. Not sure if this matters as other models using root motion are also set to none. If I change that to the root transform (or any part really) of the model the animation window adds the Lines Animator.motion Q (Missing!) and Animator.motion T (Missing!)
Ok, I’ll take a stab at this, although it is a bit confusing. What is likely happening is that you can’t alter the fbx, which is why it is removing your changes. What you can do tho, is create a new animation in Unity, drag it into your Animator Controller, and then edit the animation in the animation editor, only moving the rootbone. Then, you’d need to mask out the rootbone in the normal movement animations, in the Animator Controller, and play both the normal animation, and your new root motion animation together when you move forward. I hope that isn’t too confusing.
Finally got it! Thanks for your help. Your suggestion was great and helped me figure out how to do it like originally intended. I’d all but given up but finally read elsewhere you can hit Ctrl D to duplicate the fbx animations to create a separate (non read-only) anim file outside the fbx. I added a transform and/or rotate component to the uppermost hierarchy of the anims and a quick tweak or two and Voila! Then the Generate Root Motion Curves Button was visible AND no longer greyed out. I still (needlessly) butted my head against a wall as the previews of the anims still showed resetting location upon looping. But when testing actual gameplay it worked beautifully with simple manipulation of the mecanim variables. Thanks again. I hope my few days worth of struggle (this is also my first foray into mecanim) helps someone else.
Also, it’s a good idea to rename the animations as they match the originals and several of my hair-pulling screaming fits may have been a result of the animator controller occasionally reverting to the fbx anims instead of my custom ones.