Rigging mechanism - help please

Hello !

I´m working on mechanical rig for an animation. I made a lot of attempts, but the rig didn´t work properly. Is there any solution to do this ? I tried to play with bones and IK, but it doesn´t behave like I wanted. If someone could help me, I will be really glad! Thanks a lot !

here it is:

here is the sample file:
https://drive.google.com/drive/folders/1o4dRJ_IXySa_RuJIbsYIGldK2Pj_ifL8?usp=sharing

I’ve thought about this problem a bit-- my mind wasn’t working very well when you posted-- and I think you need to do drivers to do this. IK is not enough. What you essentially need is a “rotate-to-floor” constraint. This isn’t built into Blender.

A rotate-to-floor is another way of saying, you want the intersection of a plane and a sphere. The sphere is centered on the bone being affected; the floor is the intersection. In your case, the plane would be defined by the tabletop, and the sphere would be defined by the bottom of your legs.

I tested out a sphere-plane intersection structure recently, just to make sure I could reason it out-- it involves a little bit of trigonometry-- and so rather than solve your entire problem, I can share the file I made:

sphereplaneintersection.blend (150.6 KB)

This will take a bit of reasoning to apply to your problem on your part. However, and I’m feeling lazy today-- only offering one piece of the solution.

Hello, Thank You for your idea ! It seems that could solve this type of machanism. It is a bit challenge. However I made “fake it until you make it” solution just for now. I did manually few movements and then baked them into keyframes, then attached them to the action constraint that drive my baked animation.