Control parent bone with offset I'm trying to rig a hydraulic piston:



I added a bone for the base part of the piston and one for the moving part. I added a "Track To" constraint to the base part so it points at the moving part. Then I added a "Copy Rotation" constraint to the moving part so the rotation stays the same for both bones.

This worked fine for the first piston (the black bone - you can only see the base part) but I can't get the second piston working.

The problem is the blue bone - it has to stay at 90° to the yellow bone. How can I get the yellow bone to rotate around the head of the blue bone?

I tried Inverse Kinematics, but I don't get the right result:



Now the 90° part works but the IK-bone isn't pointing to the green bone (it just
aligns the yellow dotted line with it)

I hope someone can help me.

Thanks in advance,
Sebastian

EDIT: I've added a link to the blender file: https://www.dropbox.com/s/uypfpwiy9r9ldd3/Cannon.blend?dl=0
I finally got it working by adding a "Transform" constraint to the blue bone (target: yellow bone, x: 0-360° -> x: 360-0°). It doesn't work perfectly, but its good enough for my purpose :)