I have a small project with a train that follows a track, composed of discrete pieces. For each piece I calculate the location based on distance traveled, and each carriage gets a fixed offset.
I would like to improve on this with proper bogies, but the distance between the two bogies of a carriage is not the length along the track, it is always fixed distance. How do I best confine my bogies to a track, while kepping the distance between them fixed, regardless of the track curvature?