Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions How do I let an object follow anothe realtively with an expression?

  • How do I let an object follow anothe realtively with an expression?

    Posted by Henk Wijsman on September 20, 2010 at 11:54 pm

    AE and I have had a slight difference of opinion. I hope someone can help me with this (probably) simple question.

    Basically. I want MyChildObject to follow the movement of a parent, with a slight delay. The following code seems to change the absolute position of the object, instead of relatively following it’s parents movement.

    Suggestions are very welcome.

    Thanks, Henk

    thisComp.layer("MyParent").position.valueAtTime(time-.5)

    Chris Wright replied 15 years, 8 months ago 3 Members · 2 Replies
  • 2 Replies
  • Kevin Camp

    September 21, 2010 at 3:46 pm

    you want it to follow the parent, but not the parent’s precise position?

    you could create a positional offset by adding the layer’s value, something like this:

    value + thisComp.layer(“MyParent”).position.valueAtTime(time-.5)

    then you’d be able to adjust, or even animate the position of the layer.

    this will change the current position of the layer, since now the value will be relative to the parent layer, so you will need to adjust the current position value to get it back where you want it.

    i’m sure there is a way to use layer space transforms to get all the layer’s positions relative to the comp’s space, but i still struggle with layer space transforms…

    Kevin Camp
    Senior Designer
    KCPQ, KMYQ & KRCW

  • Chris Wright

    September 21, 2010 at 7:24 pm

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