Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Expression help needed

  • Dan Ebberts

    February 10, 2009 at 7:16 pm

    Try this:

    A = thisComp.layer(“a”);
    B = thisComp.layer(“b”);

    a = A.toWorld(A.anchorPoint);
    b = B.toWorld(B.anchorPoint);
    2*b – a

    Dan

  • Jon Smith

    February 10, 2009 at 7:22 pm

    Worked liked a charm. Makes complete sense once you write it out. Thank you so much.

  • Jon Smith

    February 13, 2009 at 4:58 pm

    I now have a new problem. What If I don’t want C to equal the distance betweem A and B. I want to be able to move C around but keep it at the correct angle?

  • Dan Ebberts

    February 13, 2009 at 5:51 pm

    One way would be to add a slider to c and change the expression to this:

    slider = effect(“Slider Control”)(“Slider”);

    A = thisComp.layer(“a”);
    B = thisComp.layer(“b”);

    a = A.toWorld(A.anchorPoint);
    b = B.toWorld(B.anchorPoint);
    b + (b-a)*slider

    You might want to adjust the slider range so that it only goes from 0 to 5 instead of 0 to 100.

    Dan

  • Jon Smith

    February 16, 2009 at 4:26 pm

    Thanks once again Dan Ebberts!

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