Scripting troubles, dragging to bend hinge joints

I’m struggling to figure out a way to set up an ‘arm’ that can be positioned at runtime by dragging the hand. What I’m getting is an arm that flails around and is totally uncontrollable.

I figure that I’m either missing something when setting up the joints, or my drag script is missing something. The joints are all set up with Hinge Joints, hinging on the z axis. The colliders are all sized so they don’t intersect. And I have a dragging script that works fine otherwise and does work with rigidbodies using MovePosition at FixedUpdate.

I know that this isn’t a whole lot of info to go on, but has anyone done this before and have an idea what may be missing?

I believe that you’re ‘simply’ trying to implement inverse kinematics. In that case, the only way to achieve them is to make the parent bones drive the sub bone into the desired position.

This is usually 3d editor stuff, computationally intensive. Efficiency wise, in games you just use animations made from inverse kinematic rigged characters, heh.