Parenting & Linkage to create a moving Train
by Marcus Folkesson
on
Dec 2, 2008 at 8:34:18 am
Hey,
I need some advice regarding the need to create a moving train. I will use a top view, where a locomotive will carry a couple of vehicles behind it. Each and every vehicle will be connected to and follow the other. I have no problem with the parenting part. I do need help to solve the linkage between the vehicles though! How do I connect them and make them move seamlessly and independently?
Re: Parenting & Linkage to create a moving Train by Trent Armstrong on Dec 2, 2008 at 7:06:17 pm
It might be best for you to use valueAtTime() for the cars that follow. You can put layers in numerical order and use the index of the previous layer to link through valueAtTime().
Have the Engine layer Align to Path.
You would need to adjust the (time - #) to get the right offset. This can be done easily across all the layers with an Expression Slider.
LAYER 2 Position Expression: thisComp.layer(index - 1).position.valueAtTime(time - 1)
Then duplicate Layer 2 for the number of cars you need and replace them if you need to.