# Prevent Loose Bone Joints

I have this slider-crank rig working but the circled joint between the "ROD" bone and the "PISTON" bone pulls apart a little bit as I rotate the "CRANK" bone away from PISTON. And the ROD bone pushes into the PISTON joint when CRANK is rotated towards PISTON.

ROD is parented to CRANK, and has "Track To" targeted to PISTON. PISTON is unparented, and has "Copy Location" targeted to ROD tail. And "Limit Location" on all axes except local Y.

Is there a way to make this joint behave more like a "connected" joint --- stable, with no movement?

Thank you very much for any assistance, Rob Blender 2.91.0

.blend slider-crank.blend

• Sounds like you have a dependency loop. Rod's rotation depends on the location of Piston. But Piston's location, at the tail of Rod, depends on Rod's rotation. Which depends on Piston's location... I'd recommend deleting the track-to constraint, it's redundant. Jan 17 at 6:27
• providing a blend file always helps to find a solution, because else it is more guessing than solving... Jan 17 at 6:37
• Nathan ---- just looked, and I do have a dependency loop. However deleting the Track-To breaks the whole thing. Thought I'd found a simpler slider-crank, but I guess it's back to the drawing board. Jan 17 at 6:47
• Chris --- added the blend file. Thanks Jan 17 at 9:46

You can use the Theorem of Pythagoras:

I added three bones, for clarity:

j3 is simply child of Crank.

j2 uses a copy loc constraint to copy only X loc of j3

j1 is the traget of Rod track to constraints, and piston copies loc of j1.

We know that a = square root of (square c - square b) by the Pythagoras theorem.

c is a fixed value, equals to Rod bone lenght. b is equal to the distance between j2 and j3.

We want that the x loc of j1 is equal to x loc of j3 + a.

So I've set a driver on its X loc to follow this formula.

In the drivers panel the first variable uses a "distance" operator, while the second variable (varj3) use a transform channel (x loc of j3 bone).

The fixed number .067 is simply the square of the rod bone lenght, measured in Blender units (I suggest to do the operations using blender units, then switch back to imperials when you have finished).

• Thanks, Josh! Still trying to get my head wrapped around drivers. For hours now, it seems like the driver is offsetting from 0,0,0 pose space rather than global space, if that makes any sense. I'm wondering if bone roll affects any of this? I'm still a total newb at blender!!!!! Jan 18 at 7:28
• Eureka! It's working! I did have to tweak my driver a little bit to : varj3 - c + sqrt(c*c - var*var) Took me quite a while to get that offset figured out. AND my bone rolls straightened out. Works like a charm, and NO dependencies!!!!! Thanks Josh! Jan 19 at 6:11