Rotate an object as per the translation of another

Hi all,

I am working in Motionbuilder.
I am trying to create an animation where a foot is pedaling the crank of a bicycle. There is a bone in the middle of the crank and another one for the foot. The foot while pedaling, moves around the crank in a circular motion in the Translate Y and Z axes (the X axis does not have any values). The crank only rotates in X-axis in its local space, as in reality.

Bone_Crank needs to get its rotation-X values from the translation-Y and Z values of the Bone_Foot.

The problem is visualized here:
https://imgur.com/gallery/GbVVRGF

Can I work this out using a Relation Constraint? I haven’t used this constraint in my work before so, I am still in the learning process. Can anyone help me create a math equation to get this please?
Any leads or suggestions for a start, will be greatly appreciated!

Thanks!
Peace.

Could take the output from an aimConstraint, modulo the result and pipe it back into the crank in a relation constraint.
That said, is there any reason you’re not doing it the other way round? Crank rotation driving the foot?
That’s just a parent/child with position only enabled.

I am not doing the other way around, because the animation of the character is received from a motion capture data, so I am just trying to be faithful to that and match the crank animation with the mocap data.

Gotcha.
aimConstraint might do everything you need.
Just uncheck the axis you don’t want modified by the constraint.

Thanks for your reply. I did try the Aim Constraint in the beginning. However, the problem is, the crank is not taking the full rotation. It’s rotX value stays only positive and doesn’t go the full circle.