I've got a 3D character, rigged. I can setup an IK skeleton target, move the target around and have the hand follow it just fine. I'm 3D raycasting to follow the mouse and moving the target to the mouse position. The hand/arm follows it without issue.
However I'd like to also have the hand move towards the target within the constraints of the rigged character when one of the other limbs is PinJointed to something. So if I had a cube with the left hand pinjointed to it and move the right hand target away from the cube the character would stretch as far as they could to try to "reach" the target. If I had the left hand pinjointed to a wall and moved the right hand target up, the characters hand would move toward the target lifting the character until such time as the IK skeleton of the character would be constrained from further movement by the left hand pinjoint.
I can pretty easily envision what I want but translating this into code is where I'm getting stuck.
Any ideas or suggestions?