I have created an empty to hold the relation of the resting position of a bone to a weapon. I am setting a copy transform constraint on the hand IK with this empty as the target. The constraint matches the location of the empty correctly, but I am getting odd rotation.
This is the hand IK (with mesh hidden) and empty. The empty is parented to the weapon.*
This is the resting position that I am trying to achieve with the empty and copy transform constraint. This is so I can set the hand to the resting position relative to the weapon.
This is the result I get when adding the constraint with the empty as the target. Not what I want.
I have tried matching the rotation of the empty to the rotation of the hand_ik in pose mode, but that gets me the results shown above. My best guess is this has to do with how quaternions work, but I don't know how to go about fixing it. How can I set the empty rotation in such a way that the hand will have the correct resting rotation when I add the copy transform to the hand ik?