I’m trying to create a procedurally animated character. The position/rotation of the character is determined by the feet, so moving the feet moves the character.
The easiest way to control the IK targets would be for them to be in the root of the scene so that when the character is moved the IK targets aren’t affected. (When using Final IK I just added a small utility script that unparented its game object on start.)
The issue is that it doesn’t look like you can change the parent of IK targets at runtime. This means I can’t keep the IK targets in the character prefab and just unparent them at runtime. I don’t want the targets to exist outside the character prefab in edit-mode since I’ll have to create and position new targets every time I make a new instance of the character.
I could create another set of transforms for each target, unparent them at runtime, and then constantly convert their position/rotation to be local to the actual target and then assign those position/rotations back to the actual IK targets, but if there’s already a way to handle worldspace IK targets I’d love to know about it.
[edit] It appears that setting the targets parent to null in Awake works, but I’m still not sure how to change the parent once the Animator has been initialized.