Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions scale dependent on distance

  • scale dependent on distance

    Posted by Rikard Lassenius on May 8, 2017 at 6:47 am

    hi been struggling with a challenge that should be really simple. want to have o large number of short lines turning towards a null, and becoming shorter the closer the null gets.

    made a line as a shape layer, and gets it to turn toward the null with the lookAt expression.

    but how do i make it scale the Y scale? managed to affect eg opacity using the lenght attribute, but not the scale. how do i do it. thanks a lot!

    length(thisComp.layer("line_01").position, thisComp.layer("NULL").position)

    Rikard Lassenius replied 9 years ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    May 8, 2017 at 7:04 am

    You might have to multiply d by some factor to get the right relationship, but maybe something like this:

    d = length(thisComp.layer(“line_01”).position, thisComp.layer(“NULL”).position);
    [value[0],d]

    Dan

  • Rikard Lassenius

    May 8, 2017 at 7:31 am

    nice. thanks! saved my day!

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