One idea regarding root motion would be a button “extract root motion” from an animation clip.
You could use the walking animation in place and an extracted curves track for the root motion. That way blending would happen like every other curve you have.
Thanks for the idea. The fact is that if it was possible to extract the root motion from a clip, it would also be possible to simply playback it 🙂 I have tried countless of different things, but I’ve come down to the conclusion that Playables API (which is still experimental on the Unity side) has still some bugs. So I will always keep an eye out for new Playble API improvements from Unity and retry implementing root motion for the Mecanim Track which is totally top priority for me as well.
The Mecanim Track, does work with root motion just fine though right now. Of course playing clips directly like in the Animator Track is far more intuitive that setting state machine parameters 🙂
Once again, this is top priority. I will definitely check this again, and see if I can somehow utilize your idea to work around this for the time being.
I thought about something like a button, onClick generates a hidden gameobject, the animator component gets a speed of zero and you’ll walk through the frames with animator.time=framecount/60f; and save the position in a curve or path. With an extracted path we could make slight adjustments to the position, if “straight forward” is not fully true.
Next weekend is my first work-free weekend since.. 3 months. Maybe I can learn how your system works and try it myself.
The animator.playbackTime is exactly what is used with the Mecanim Track, which only works when there is a recording to playback (animator.StartRecording, animator.StartPlayback).This works fine with the Mecanim Track and that is why root motion also works with that track as well.
The problem is that right now, recording does not work with Unity’s Playable API. I bet this is something that Unity will fix shortly though.
By all means though, if you come up with any solution, I’d be glad to hear it out, but make sure to enjoy your well deserved weekend 🙂