Control Rig Full Body IK Issue - Effector Transform Stuttering When Character is Rotating

I’ve hit a wall with this issue and I’m not sure if it’s a bug with control rig or if I’m just doing something completely wrong.

I’m trying to create a weapon aiming system using control rig’s full body IK which simply sets the transform of the hand so that the character is aiming in the right direction. However, I’m running into this issue where the hand’s transform stutters terribly whenever the character is rotating and makes the aiming utterly inaccurate.

I’ve been able to replicate this issue using a fresh third person project with the default character setup as you can see from this video -


The red arrow is the raw aim transform while the blue arrow/line trace is the resulting transform relative to the skeleton which is used to set the control rig’s hand transform, so the math doesn’t seem to be causing the issue here at least. But you can see how whenever the character rotates or changes direction, the hand will stutter and diverge from the transform that is being passed to the control rig.

The setup for the aim system is fairly straight forward and runs on tick inside the character blueprint -

First I’m getting the desired aim location based on the camera -

Then I’m setting the aim transform for where I want the character’s hand to be (red arrow) -

I’m then using the aim transform (red arrow) to calculate what the hand transform should be relative to the skeleton (blue arrow) and passing the resulting transform to the anim BP -

The anim BP then sets the transform of the hand control in the control rig -

Which is then used to set the transform of the effector for the hand in the full body IK -

I feel like I either must be approaching this the wrong way, using the wrong method, or running into an inherent flaw or bug with how control rig handles full body IKs. Any suggestions, tips, resources, or alternative approaches to help resolve this issue would be greatly appreciated!

I’ve uploaded the test project here as well in case anybody would like to take a gander -

ControlRigIKTest.zip

You’re correctly getting the Aim Location, but I’m afraid the rest takes the wrong approach to it.

Jitter

The jitter happens because of the right hand transform being one frame out of date because you’re calculating it in your character blueprint, instead of just directly computing it in the controlrig when it’s needed.

Once you have the Aim Location, you should just feed that into the ControlRig, inside that use FromWorld to turn that into a target in the global (rig) space of the ControlRig, and then do all the math there. That will be way faster (ControlRig is way faster than Blueprints and is multithreaded), and you won’t need any extra components like AimPivot. This way all the information about spaces will always be up to date and you won’t have any jitter.

In fact, you should just have the ABP compute the Aim Location, so your Blueprint won’t have to know anything about the ABP and you won’t need any sort of BPI_Animation interface with a SetRightHandTransform function just to move data from your Character Blueprint into the Animation Blueprint.

Basically, this whole thing should be a pure ABP + ControlRig setup without involving the Character Blueprint at all.

General approach

It’s in general the wrong approach to just place a hand somewhere with full body IK, it won’t play well with animations. The right way to do it is to just have your ABP play a “holding weapon” pose (where the hands are on the weapon and it’s pointed vaguely forward) and then have the ControlRig minimally adjust that pose to make the muzzle point at the target.

  1. Set up a “muzzle” bone in the control rig, parented to whatever bone you attach the gun to, so that bone is “when I hold this gun, this is the location and direction of the muzzle”.
  2. Then rotate that muzzle bone around a shoulder (or the point between two shoulders) to make it point at the target. This takes a bit of math but the result is guaranteed to not break your animation and is perfectly precise. It’s basically the problem of “given a ray and a target, find the rotation around origin that when applied to the ray makes it point at the target”. This is more or less what id did with Doom 2016 (here’s their gdc talk about it).
  3. And then you do IK to keep the hands’ fixed relative to the muzzle (full body works but is overkill, two bone ik on the arms is much faster but requires pole vectors).

If you want to save yourself the hassle of setting all this up, I made a plugin called FocalRig that does all of the above plus smoothing, procedural aim down sights, kick, spray, automatic configuration for custom skeletons, and more. With FocalRig it’s just a matter of dropping an Aim Weapon node into the Control Rig and hooking up the aim location to it. It is also around 4-5x times faster than a Full Body IK node. You can check it out on Fab here and some video tutorials here.