How to limit the motion direction of a GameObject?

As you can see in following example and picture, I want to build a mechanism which converts a rotation of a GameObject to a motion on a straight line of another GameObject. The whole mechanism should be based on Physics components. Therefore, I add two hinge joints on the red fastener. Their rotation axis is positioned at the drilling whole at the bottom and top of red fastener. But now, my problem is to limit the motion the yellow slider on top of model. It should only be moving in the direction like slider is mounted. The problem is, that I can not see a way to define the allowed movement direction. Because I can not use the constraints of the ridigbody components, and I also don’t want to use colliders or a script.

Is there any better idea how I can constrain the movement only with physics components?

If you click on the yellow box which you want to constrain, if you add a rigidbody component you will be able to constrain rotation and motion in certain axes. So if you add a rigidbody to the yellow slider and then constrain x, y, and z rotation and then constrain x and z motion, the only direction the slider should be allowed to move would be up and down, and it wouldn’t be able to rotate either. I have tested this, and it defenitely works.

EDIT: Sorry, I didn’t see that you did not want to use Rigidbody components. However, I read somewhere in the Unity Documentation a while ago that it’s best for moving objects to have a Rigidbody component.