Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Point one layer at another

  • Point one layer at another

    Posted by Joseph Bauer on March 22, 2019 at 4:54 am

    I need Null 1 to always point at Null 2.
    So an expression to control its rotation I guess.

    I’ve searched for about an hour and can’t find the answer, or the answers given don’t actually work. Thanks in advance for any help.

    Joseph Bauer replied 7 years, 5 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    March 22, 2019 at 6:37 am

    2D? Something like this:

    p2 = thisComp.layer(“Null 2”).toComp([0,0]);
    p1 = toComp(anchorPoint);
    v = p2-p1;
    radiansToDegrees(Math.atan2(v[1],v[0]))

    Dan

  • Joseph Bauer

    March 22, 2019 at 12:11 pm

    It worked!

    Thank you so much, Dan

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