I know that this is a late reply, but maybe @waylow or someone else will still see the question.
I’m just wondering – how would this would be done in a rig. High level pointers?
Also, to solve the rotation exactly in this problem, it should be simple to calculate rotation based on the x position exactly. So making a python script that calculates the y rotation channel based on x position at every keyframe would work. The only problem is, if we manually fiddle with the x channel interpolation curve (by moving the handles), it’d have to be the same interpolation curve for the y rotation channel. To match the interpolation curve exactly on every frame, maybe I could:
1) Try to set y rotation for every frame. I don’t think this could be done in a script (unless I set every frame to be the keyframe), because I can’t manually set interpolated frame values, right?
2) I could try to make the interpolated shape be exactly the same by appropriately matching the handles. Since every Bezier curve is exactly determined by the 2 points and their right/left handles, I can exactly set the y-handles appropriately (I haven’t calculated the exact formula, but it shouldn’t be too bad).
Am I missing something trivial here? Sorry for the noob rambling, I’m just trying to learn 😛