Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Object isn’t attaching to the anchor point

  • Object isn’t attaching to the anchor point

    Posted by Dylan Hay on March 2, 2019 at 1:48 am

    Im trying to make a template of this animation but the black bar isn’t reacting with the anchor point in the way id like it to and i dont know how to fix it or make it react in the way id like.

    Example: Using Default Text

    Example: Using Shorter Text

    I need an expression etc. that would adjust the anchor point depending on the length of the text so that the right side of the black bar is perfectly touching the left of the white bar.

    The code posted is used within the Rectangle path of the black bar which scales it to fit the text.

    L=thisComp.layer("Names");
    X=L.sourceRectAtTime().width;
    Y=L.sourceRectAtTime().height;
    P=thisComp.layer("Control").effect("Slider Control")("Slider");
    [X,Y]+[P,P]

    Andrei Popa replied 7 years, 5 months ago 2 Members · 1 Reply
  • 1 Reply
  • Andrei Popa

    March 2, 2019 at 6:41 am

    What i would do would be attaching this to the anchor point of the rectangle shape

    temp = thisLayer("Contents")("Rectangle 1")("Contents")("Rectangle Path 1")("Size")[0]/2;
    [temp, value[1]]

    This way, it is fixed on the right side. Then just move it near the white line and it should stay there.

    Andrei
    My Envato portfolio.

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