SIGN IN :: SPONSORS :: ADVERTISING :: ABOUT US :: CONTACT US
 FORUMS TUTORIALS FEATURES VIDEOS PODCASTS EVENTS SERVICES NEWSLETTER NEWS BLOGS
 ADOBE AFTER EFFECTS: Home Forum Basics Expressions Tutorials Podcasts AE Techniques Creative Cloud Debate FAQ

# Re: Easier Effectors?

COW Forums : Adobe After Effects Expressions

Respond to this post   •   Return to posts index   •   Read entire thread

 Re: Easier Effectors?by Dan Ebberts on Jul 30, 2008 at 5:43:17 pm

Good point. The calculation should probably be done in the layer space of the layer being rotated to allow for the rotation of layers up the parent chain.

Try this:

L = thisComp.layer("handle");
P = fromWorld(L.toWorld(L.anchorPoint));
V = P - anchorPoint;
if (V[0] > 0){
radiansToDegrees(Math.atan2(V[1],V[0]))
}else{
radiansToDegrees(Math.atan2(V[1],V[0])) + 180
}

Dan

 Posts Index Read Thread

Current Message Thread:

 LOGIN TO REPLY

FORUMSTUTORIALSFEATURESVIDEOSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

© 2013 CreativeCOW.net All rights are reserved. - Privacy Policy

[Top]