Thanks, Pärtel.
I'm aware of the EditorIK component. I followed your recommendation and followed the implementation of its Update() more closely. It still doesn't quite work. I've attached a minimal version of my script. All the classes are in the attached file.
Apologies if my previous message didn't provide the full context: the challenge here is running Final IK alongside an animation track and overriding its output.
Both versions of the script (the attached version and the one in my previous message) work if I mute the animation track. Please note that "work" here means that they're able to affect the animation output whatsoever, even if the result is incorrect - I've commented out the pose restoration code for now.
The solutions I can think of:
- Wrap Final IK solvers in Animation Jobs. This seems quite involved and I'm hoping to avoid going down this route. Having that said, you've indicated in your FAQ that you ran a test for some of the IK solvers using Animation Jobs. If you still have the code around and are able to share it, it might be a great reference.
- Rely on the solvers that come with Unity's Animation Rigging package instead. They're already written as Animation Jobs, but the issue is that these solvers are pretty basic and the quality isn't nearly as good as Final IK.
- Bake Final IK into an animation clip and put it in an override track. This only partially solves the problem. It would enable tuning other parts of the Timeline on top of Final IK in edit mode, but wouldn't enable tuning Final IK itself.
- Store the pose when Timeline is running, exit preview mode, restore the pose, tune Final IK then go back to Timeline preview. I haven't tested it, but I think it should work. It still wouldn't enable scrubbing through the timeline to fine tune Final IK and it wouldn't enable tuning other parts of the Timeline on top of Final IK.
- Tune Final IK in play mode. This is what I'm currently doing, but it's a bit tedious, especially that I'm at a point in the project where entering play mode is quite slow.
Other ideas :)?
Khaled