Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity › Forums › Adobe After Effects Expressions › increasing/decreasing Z-position based on distance to a null

  • increasing/decreasing Z-position based on distance to a null

    Posted by James Henry on June 5, 2020 at 4:07 pm

    Hi all, trying to build an automatically scaling carousel type effect.

    I have a null object (‘Center’) and I’m basically scaling images underneath depending on their position to this null. Here’s my expression so far:


    sMax = thisComp.layer("Center").effect("Scale")("Slider");
    r = thisComp.layer("Center").effect("Radius")("Slider");

    a = thisComp.layer("Center").transform.position[0];
    b=position[0];
    l = length(Abbott);

    s = ease(l, 0, r, sMax, 52);

    [s,s]

    r is a slider control that controls the radius of the null object, and sMax is the max scaling size of the image.

    I was hoping I could add another variable f = ease(l, 0, r, -100, 100) and then simply end my code with [s,s,f] but this is having no effect…

    I was also wondering if there was a way to parent multiple layers to one and have the position of these layers all animate together? When I do this it stops the code on the linked layers working.

    Any help would be appreciated!

    sMax = thisComp.layer("Center").effect("Scale")("Slider");
    r = thisComp.layer("Center").effect("Radius")("Slider");

    a = thisComp.layer("Center").transform.position[0];
    b=position[0];
    l = length(Abbott);

    s = ease(l, 0, r, sMax, 52);

    [s,s]

    James Henry replied 6 years, 3 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

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