Leaning wagons!

rail1c.blend (1.6 MB)
is this the best way of animating a train in 2.69? i used empties parented to the track and parented the wagons etc to the empties. this way they stay in line.

how do i tell the track the railways can do hills but they have to be flat from side to side!
thanks all

You probably have to adjust the tilt values of your curve, the wagons lean because the track leans. select the curve and in edit mode select each curve vertex and adjust the tilt so that it is flat. (in 3d window the N KEY and in the right hand menu choose Item-Transform and adjust the tilt angle)

you can also try the Twisting > Z-Up option, it will correct a bit, but of course it will also rotate the rails:


thanks guys.
your help is appeciated