Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions auto-orient to the center of the comp

  • auto-orient to the center of the comp

    Posted by Amestane Tindi on October 9, 2014 at 12:05 pm

    Hi,
    I just want to share an expression that seem to be hard to find on the web
    I am designing a lens flare and had hard time trying to auto orient some object to the center of the composition what ever the camera or the light position is, and finally got it!

    Enjoy,
    Amstane.

    Use the expression in the rotation value.

    x=thisComp.width/2;
    y=thisComp.height/2;
    c=[x,y];
    delta = toWorld(anchorPoint) - c;
    -1*radiansToDegrees(Math.atan2(delta[0],delta[1]))

    Amestane Tindi replied 11 years, 11 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