Now
that we have a animated train and track we can turn this into ipo information
so that the ipo property actuator can work in the game engine. There
is now a way to use a python script to this once and the in the new version
you only need to do the loco not the cars. Stay tuned and i will update this
page. Add 3 cubes naming them appropriatly,making sure the axis match
those on your empty holders.
This where it gets
a bit tedious, I havn't found a way to automate this (Trust me I wish there
was a better way Now there is. See above. Make
sure you are at frame 1. Using the snap cursor to selected and snap selected
to cursor (Shift-s)Move your dummy cubes to the same location as the holder
emptys.Then insert loc ipo keys for your dummys. Advance up 100 frames and
repeat.Continue until you are at the end of your track. You may need to advance
more or less than 100 frames depending on path "curviness" and scale.
This wont get the rot info which is why we aren't adding rot ipo keys just
yet.
At this stage when you hit alt-a the dummys should follow the holder empty's
location at least. Wind it back to the first frame and line up your emptys
using the top and side or front views to get correct alignment. Then add your
rot ipo keys. Again continue for every 100 frames.It helps if you scale your
dummys to match the draw size of the holder emptys and you turn on draw axis
in the animation buttons window.It won't matter if there are a bit out as
it will add to the realism as the cars rock about on the track.You shouldn't
find yourself rotating too much about the longitudinal axis(in this case y-axis
on loco) as trains don't normally do this.