ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Find angle of auto-oriented layer

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Rodney Atkins
Find angle of auto-oriented layer
on Mar 8, 2020 at 3:22:32 pm

Can someone tell me how to find the angle of a layer that's auto-oriented along a motion path? I need to find this value to apply it to an angle control.


Return to posts index

Dan Ebberts
Re: Find angle of auto-oriented layer
on Mar 8, 2020 at 8:26:48 pm

Try this:

L = thisComp.layer("Layer 1");
v = L.toCompVec([1,0]);
radiansToDegrees(Math.atan2(v[1],v[0]))


Dan



Return to posts index

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