FORUMS: list search recent posts

auto-orient to the center of the comp

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Amestane Tindi
auto-orient to the center of the comp
on Oct 9, 2014 at 12:05:00 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]))


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]