(using English so I can reply faster, sorry!)
I recorded how to add an IK target without the bones moving (described in my post above):
Loading Image
You can see parentBone
and childBone
do not move when IK is added.
I don't understand your example【B】. You explained you have bones root > aBone > parentBone > childBone
, but which bones do you want controlled by IK?
Spine supports IK using 1 or 2 bones, for example childBone
or parentBone, childBone
:
Loading Image
If you want 3 bone IK, for example aBone, parentBone, childBone
, unfortunately Spine cannot do that. With 1 or 2 bones, IK can be solved directly with math. With 3 or more bones, IK is more complicated and does not have a direct math solution, it is done incrementally. This means the solution depends on the rotation of the bones in previous frames. To jump to the middle of an animation, we would have to start at the beginning of the animation and compute the IK solution for each frame until we get to the middle. Doing that is expensive.
Consider if aBone, parentBone, childBone
used 3 bone IK, this would be one solution:
Loading Image
This would also be a solution (target
has not moved):
Loading Image
There are an infinite number of solutions for 3+ bone IK. This is why the IK solution must depend on previous frames. We may do that in the future, but so far we prefer to keep it easy to apply an animation at any frame, without worrying about the pose in previous frames.