Automatic FK/IK snapping not lining up correctly


I’ve made a rig that includes script nodes in the maya scene file that are attached to a control for the arms and legs that switches from FK to IK and snaps FK to IK and IK to FK. The FK to IK snap works great, but the IK arm’s elbow point orient is always just a little bit off.

The way I have it set up in the script is by having the arm IK control snap match the position of the FK wrist bone. I have a locator that at 0 matches the location of the elbow point orient control exactly, with a parent constraint from the FK elbow so that I can then match the transforms of the IK orient to that locator when switching. However, like I said it never seems to match up perfectly. It’s always just a little bit off. Any clues as to why this could be?