Making train cars follow a path in SF
How to make train cars that follow the lead car's path without a trace per car
Cars must maintain a constraint/link to the car ahead - calculate the rotation and translation needed to preserve the link starting from the engine and working back (a simplified constraint-maintenance problem; the fully correct solution is a linear problem). Alternatives like delayed recording of the front car's movement phase into themselves when stopped.