2 bone IK animation during runtime

Typically you expose the ik target as a variable and update it during the AnimBP’s UpdateAnimation event.

Hi, I’ve got an issue with an IK animation.
My rig consists in several bones (“arm”), with a two bone IK configured, it’s effector location set as a vector variable. This vector is itself set by getting the location of another referenced actor in the world (“target”).
My problem is : when moving the arm, it updates fine and the ik target is well used. However I want to update the arm when I move the target. I’ve set a “construction” event in the arm BP that is called by the target on construction script, but it only works for one axis (Z), and I have to compile the arm to see the changes. Also during runtime if the target is animated (using a sequence), the arm doesn’t take fully note of the movement (only 2 axis).
Did someone experienced this ? Is there a way to “force” the update in the editor (not PIE) and/or during runtime to ensure the target is used correctly ?

Oh, thanks to you I found the “set update animation in editor” node :slight_smile:
Actually I already get the target as a variable to get its location. The animation is updated durig Event Tick (I can’t set the target directly as a variable in the animation blueprint).
Another question though : the final rig is made by 2 two-bone IK (bone003 to Bone005, Bone005 to Bone007) and one look at (Bone006). Updating the animation only takes care of the first target and updates the first ik, not the second one. Any idea ?
EDIT : alright it is due to another rotation of the root bone that makes the whole thing bad. Thanks a lot !

Well I’m sorry but one problem still occurs.
I have to explain my complete setup :
the arm is made of 7 bones. Bones 3 and 4 are linked with an “arm” IK. Bones 5 and 6 are linked with a “head” IK. Bone 7 has a look at.
In order to keep the arm aligned with base (and not to twist), I had to setup the whole thing (DefaultSceneRoot) to rotate on its own Z axis, depending on the location of the arm target.

However when the DefaultSceneRoot rotates, the arm can’t reach it’s target (target is defined in Component Scale, the rotation probably fails to keep this relative coords ?). How could I make the arm follow the target in 3 axis and kinda lock the bone1 rotation in one axis ?
If needed I can give some screenshots and/or send the file for further explanations.
EDIT : please note that the rig works fine while in editor, but goes wrong when PIE.

Here are two gifs to illustrate :
How it should work (don’t care about the last “jump” to start position)


How it actually works


Well after many tests, it works. Don’t really know why, but it probably was linked to a bad coordinate reference (World instead of Component or something else) in the animation BP.