Bone origin to specific angle?

Hello, I’m still trying to get a rig right for some pistons that are off - center of any axis.

So far I have 2 bones placed at outer / inner part of piston. They both have a track to constraint. Now I would like to limit the sliding of lower bone to blue line in image.

How can I precisely orient the origin so that I can “slide” on z axis?

Thanks.

You can create a custom orientation from your selection (be it an object, a bone, a mesh face…) from the 3DView header : click the + icon in the transform orientations popover (the one showing global, local, etc). Then you can transform using these new axes.

If you’re asking how to rig the piston so that it moves on this axis during animation, it’s different. Depends how you rigged it in the first place… I assume you used constraints? most of them allow picking local space in their properties, using that would “just work”.

I would first unparent the geometry.

then you can try in posemode to overwrite the current
pose as RestPose

and then parent the geometry again

new_restpose