How can I rotate a bone to match a world rotation?

I’m trying to match the hand_r rotation with the camera, so that my hand always stays in the same place with respect to the camera.

I first compute the intended hand position and rotation with:

Then I apply it on a VB hand_r bone so that I can do a proper hand_r IK:

The result does move & rotate with the camera, but the hand_r rotation is 180deg or so rotated, so that the gun faces in the wrong direction:

image

I imagine this might be due to the VB hand_r having its own original animation rotation?

image

What can I do to have, as end result, the gun point away from the camera?

Thanks,
r.

Don’t know much about this area, but I’d say your hand socket is pointing the wrong way

image

The X is pointing up the arm, shouldn’t it be pointing towards the fingers?

That’s how the reference bone is…