-
Animating a train: trailing, expressions and positioning problem
Dear CC users,
I have stumbled upon a problem my brain cannot seem to solve.
I am trying to animate a train where the cars follow the leading locomotive (they should follow the path with a certain delay). I have found the expression that should let me do this – thisComp.layer(“name”).transform.position.valueAtTime(time – sometime) – and while this works in a very basic setup, it for some reason won’t work in my composition! The problem is when I add this expression to the layer that should follow the lead, it JUMPS AWAY, as in, it re-positions itself and starts hanging somewhere in the middle of the screen! And for some reason I am not able to position it in the way I want to (it just won’t move).
I have created a null object which follows a certain path. I have linked the train to this null object using parenting and positioned it alongside the path (this works like it should). And then, I position my following car behind the train (I am not linking it to anything), I add this expression, and BOOM, away it goes, ending up NOT at all behind the train, but hanging in the air. It does follow the path, in the air, with the needed delay, but there’s just no way that I can position it where in should be!
What could explain this behavior??? I’m a bit at loss here and I hope that you could help me out…
Thank you very very much for your time!