New rigging system : Twist correction issue

Hello! I got an issue with what should be a simple hand IK. I have:

  • Two bones IK constraint (hand → elbow → shoulder)
  • Twist correction (copy hand rotation on twist bones, 66% and 33% weights, not parented to the hand)

It’s from a Maya rig, so it’s using the X axis for the rotation.

The issue: The two bones IK constraint provides a quaternion on the hand that sometimes reverses the solution. No visual impact, AFAIK it’s just how quaternion are, so the X rotation jumps from < -170 to > 170, but the transform gizmo remains the same.

What’s problematic is that the twist correction messes up when that changes occurs. Here are two screenshots showcasing the issue.

Here the hands rotation moved just a little bit, and the x rotation is now positive (x = 177). Notice how the twist correction glitches and we now have an incorrect solution.

This only happens when there are 2 or more nodes in the twist correction. If the twist correction works with a single node, then it works fine (except that it looks ugly and is therefore not an acceptable solution).

All bones use the same orientation (forward = x, up = -y).

Thanks for the help!

OK so I figured out a more precise explaination for this issue.

The twist correction works correctly when rotating the wrist to the right, but it doesn’t work when rotating to the left.

The other consequences being that when the correction switch from right to left because you turned your wrist 180°, it goes from “OK” to “bad” instantly.

So the actual problem is that the twist correction does nothing relevant when rotating specifically to the left.

(couldn’t add those images to the post above, in edit you can’t add new image it seems)

9179780--1278554--left.png
9179780--1278557--right.png