Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects expression/parenting problem… not the usual kind?

  • expression/parenting problem… not the usual kind?

    Posted by Scott G on December 14, 2006 at 11:07 am

    at least i don’t think it’s the usual kind.

    usually in the past with expressions and parented layers i can pickwhip to either anchor points or other object to get around the problem, but i’m feeling a bit tired and it must be affecting my brain.

    i have a foot graphic parented to a circular layer, which rotates. the foot has an expression so it stays level.

    now, when the foot hits the floor it should stay ON the floor. i’ve got my rotating layer with it’s mid point in line with the floor (ie, half above, half below).
    i wanted to put an expression on the foot that says “if you go below the y value of the floor, then clamp your y value to have a maximum of the floor’s y value, else you can do what you like.” basically i want the foot to follow a semi-circular path, arc-ing up and down, then staying on the floor, then arc-ing up and down.

    problem is, because it’s parented, the y value never changes – there’s no fluctuating value so i can’t have it stay on the floor.

    any suggestions?

    thanks,
    scott.

    Scott G replied 19 years, 5 months ago 2 Members · 2 Replies
  • 2 Replies
  • Mylenium

    December 14, 2006 at 12:36 pm

    You need to use layer space transforms like toComp() to convert your relative parented position to absolute composition coordinates. Do a search, this has been covered quite a bit in the past.

    Mylenium

    [Pour Myl

  • Scott G

    December 14, 2006 at 11:10 pm

    that doesn’t really help, because the foot layer needs to move relative to the null or parent, not relative to the world.

    i can’t say “if y value drops below this world-coordinate then clamp it”, because the world coordinate is something like 500, when the position of the foot is only 50 or 60, because it’s relative to the null.

    i can’t see how i can use layer space transforms on the parented layer. sure i could get the world position, and use that in an expression on ANOTHER layer (like, to emit particles from the foot if i wanted to do something that crazy), but not the layer itself. does that make sense?

    maybe i can duplicate the foot layer, hide the original, and then use an expression to make the position of the duplicate the same as the world position of the hidden original, clamping it when it moves beyond my range.

    hmmm sounds like it might work!
    will try…

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