Hello, as you can see by the title I am currently scratching my head on how to solve this issue (And have been for weeks). Before you write up a reply I know a similar question has been asked before, but this is different because I don’t have a model that already has an animation on it.
Instead, the animation is done and created inside of unity on a ‘humanoid’ model (using the built-in IK) and on recording it ‘records’ the transformations on each ‘marked’ joint. Building out the list and essentially creating your mess of keyframes into a legacy animation clip. (Then I just do a simple conversion to a generic clip via unticking the ‘legacy’ box on the clip). Simple and easy and it works. Heres proof.
directlankyglowworm
Uses the original Vive headset (plus the 2 controllers and 3 additional trackers) and it works perfectly fine provided that there are some inaccuracies here and there but anyways that’s not what I’m here for.
Here’s the problem.
In my game, I have these recorded mocap animations of course that will be used for different situations. However, the player can influence the AI and I need to use IK for this (I.e. pushing its hand or arm back). No physics ragdoll because it’s too unstable for it.
To my understanding, only the humanoid type supports IK. Yet humanoid and generic animation clips are completely different.
Humanoid animation clips keyframe a bunch of muscle movements while with generic animations you can keyframe just the transformations (position, rotation, scale, etc.)
So my question is, how can I convert my (unity made) generic animation clip to a humanoid animation clip? (I don’t want to drop money on plugins for this).
There is a chance I’ve grossly overlooked something, and that’s possible since I spent a long time trying to figure this out. But simply putting the generic animation clip on my humanoid model won’t work and I’ve tried, and I’ve also tried making a custom IK but failed.
I have in the meantime a very crude solution that I’m not too happy with but it works somewhat decently where I have 2 models for my AI, the generic model with the animations on it for reference (invisible), and the humanoid model (visible) with IK enabled. I basically run the animation I need with an animator controller on the generic model and with the humanoid character, I do a mix of matching the position and rotation of each joint + IK on feet and hands to match the hands and feet of the generic model. It’s not 100% accurate and it sometimes does glitch out but I somewhat maintain the IK feature and I can influence the AI as I need but this solution is very very rough and inconvenient.