Train carriage following a track

I am trying to get a long vehicle like a train carriage to follow a path. Let’s say I have a simple elongated plane. I want the middle of the front edge and the middle of the trailing edge to be clamped to the path.

I have tried a few rigs including empties that are clamped to the path but I can’t get the plane to follow the track how I want it to.

Most of the suggestions I have seen end up in deforming the carriage or allow the carriage to pivot in the middle. For me it is essential that the ends of the carriage stay on the track. I can make one end work but not the other.

Any suggestions?

I don’t think there is an easy way to do this properly, here is how I would do it. You have to model it like a train; so first you need a plane for the train with loop cuts where the beginning and end of each carriage will be and a loop cut down the middle so that there are 3 vertices present. Now add 2 smaller planes (BTrol and FTrol) where the front and back wheels of the carriage will go and then vertex parent them to the vertices on the train plane for the front and back of the carriage. Now add a cube for the carriage and move its object centre to where the front wheels will be. For the cube, add a copy location constraint with FTrol as the target and a TrackTo constraint with BTrol as the target. Repeat for all the carriages.
On the attached blend file if you select the train plane and move along the x-axis the carriages of the train should follow the curve as expected. The train plane has the curve modifier.

train cars1.blend (532 KB)

Thanks for the reply and the Blend file. I sort-of understand but I think I’ll have to try reproducing the blend file to understand it. If I move the plane carefully tracing the curve, I think everything looks like how I need it. If I add a “follow path” constraint to the plane, it jumps out of alignment and then the ‘train’ grows and shrinks as it moves along. I can’t see any residual scales or rotates so I’m not sure why it jumps out of alignment… but I will ultimately need to be able to automatically run the animation.