When the IK moves on the global Y axis it transforms well the local Z axis of the clavicle. Resulting in a forward/backward rotation.
But when i do the same for the global Z axis to transform the local X axis (to get a up/down rotation) it’s getting weird. The arm is going up for no reason, and the modifier is working (if I can say) only when the IK is going down. I tried to invert the Source values but it’s still the same.
The world space Y position (depth) of the hand IK bone is basically 0. But the world space Z position (height) of the hand IK bone is positive something, not 0.
If you want to measure offset from unposed position, don’t use world space coordinates. Use local coordinates. (But what about the axes? Change the axes of the bone. Or if you need those axes for something, make a duplicate with different axes and copy world space transforms, then target that bone’s local transformation.)
Or, offset the transformation by the unposed Z position of the bone. If your handIK is at world Z = 5.0, then measure from 4.5 to 5.5 instead of -0.5 to 0.5.
Not without adding more bones. But they don’t need to be deform bones. What you’re interested in is the relative distance between the tail of the upper body bone and the IK bone, in the Y axis of the upper body bone. Roughly. You can measure this distance for a transformation constraint in a number of different ways, but to my knowledge, they all require extra bones. (I’d probably create a floor setup: a child of UB to get double-floor constrained to a plane, and a target of that at the hand copying world rotation from UB to get the proper axis for the plane. Both non-deforming bones, on some hidden layer.)
I didn’t understand very well your method but you gave me some ideas. I just used the damped track modifier with limiters and the rotation on the local x axis is very good.