I have a script that creates an AnimationClip and sets its curves (based on mocap data obtained at runtime). I was able to use it with no problem with a legacy Animation component on character that I created that has the same structure as the mocap data. Now I want to retarget it to a character using the Animator component that’s been rigged with a humanoid avatar.
I tried something like this that I found in the Unity Manual (Unity - Manual: Playables API)
// Generate a clip on the fly
AnimationClip clip = wrnch.GenerateClipFromMocap();
// Wrap the clip in a playable
var clipPlayable = AnimationClipPlayable.Create(clip);
// Bind the playable to the player
But it doesn’t seem to animate the character at all. As far as I know, I haven’t told Unity how to map my animation clip to a humanoid, so maybe that’s why it doesn’t work, but I haven’t found anything in the docs or forums on how to accomplish this. Is what I’m trying to do even possible?