Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity › Forums › Adobe After Effects Expressions › Controlling Pos of a layer from null in parent comp. child comp starts later

  • Controlling Pos of a layer from null in parent comp. child comp starts later

    Posted by Gareth Axolotl on November 5, 2021 at 3:57 pm

    Hey, I apologise, I’m sure this has probably been covered hundreds of times but I can’t find the solution anywhere and I’m tearing what little of my hair is left out!

    I have a an animation of a train moving between various stations, the animation has by necessity been split into separate scenes, but I want the train within each of those scenes to move seamlessly between them, I have the train comp within each scene, and I’m sure I can parent the position of the train comp to a null in the main parent comp and use that to control the position, but it isn’t working.

    I think it’s down to the comps starting at different times along the main comp’s timeline, but I can’t for the life of me figure out the code to solve that, I’m 100% sure I’ve found the code before but no luck this time.

    Using AE 2021

    Dan Ebberts
    replied 4 years, 10 months ago
    2 Members · 1 Reply
  • 1 Reply
  • Dan Ebberts

    November 5, 2021 at 7:04 pm

    The nested comp with offset start time stuff is always tricky, but it will probably look something like this:

    C = comp("Main");

    L1 = C.layer("Null 1");

    L2 = C.layer(thisComp.name);

    L2.fromComp(L1.toComp(L1.anchorPoint,time+L2.startTime));

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy