- Home /
Is there a Mecanim callback for, "Where X bone would be if IK was off"?
So, I have a humanoid character, who has weapons spawn into his hand during runtime.
I have a script controlling everything, including which hands use IK to grab the item, avatar masks that allow the player to move while playing upper body animations,
here is where I'm stuck: need to parent the item to the hand bone, so the upper-body animations also move the item. i also need the hands to move to a certain point on the item (this, i can do) but if the hand moves to grab a point on the item, which is parented to the hand, the item moves even more.....you see my problem here.
so my first thought: i could have an invisible skeleton, always playing the animations without considering the IK, allowing me to position the item (like a sword) to where the hand WOULD be if IK was off.....this way, the visible character, can do IK grabs on the item, with those IK grabs moving the item.....
but, before I take that approach, I need to know: is there a way to get that information in script, without having to use this method? basically, "where the hand would be in the raw animation, without considering the IK that is actually being run on it"?