how to make a train follow railroad track

Hi

I have been searching for an answer about how to get a train (locomotive and one or more carriages) to follow a railroad track ?

The track will be made up of stretches which are straight as well as curved ones

You need a pathfinding algorithm.

The easiest way to do this is use one of the AI packages out there.

This one is very good and has a free version

http://arongranberg.com/astar/