I've scoured the internet for literally days and torn my hair out to no avail.
The images above show the 5 stages of the animation of the crosshead with the concerned parts showing. I'm not 100% au fait with the part names off the top of my head. As you can see, the bar attached directly to the crosshead at the bottom is level at the middle of the stroke, has a slight rise at the outward end of the stroke, and a large rise at the return end of the stroke.
The vertical part connected to it should follow it - you can see the section that attaches it to the aforementioned bit.
I have a three part system here - the two visible parts, plus a dummy object attached to the horizontal piece.
As the vertical piece pivots at a point further towards the centre of the locomotive (widthways) than the horizontal one, the dummy object has the same Y and Z coordinates as the part where the horizontal and vertical pieces join, but has the X coordinate of the pivot of the vertical piece. This means that the LookAt constraint is never pointing at an angle outwards or inwards, only back and forth.
As you can see from the 5 images demonstrating the animation, the vertical piece rotates not only back and forth as it should do on the X axis, but also left to right on the Y axis.
No matter what I try - whether it's the setup of the LookAt constraint itself, or the hierarchy system (disabling axes for example), etc etc, it seems to always do this. I have tried different set ups altogether, such as using bones instead, with exactly the same effect.
I have scoured through tutorials and forums and every single suggestion has fallen flat.
I have tried animating it manually but even with this number of frames to play with it just doesn't look good enough. Despite spending hours on calculations to try and get it spot on I can't accept it.
What on earth can I do?!