Activity › Forums › Adobe After Effects › Arrow always pointing to centre.
-
Dan Ebberts
June 19, 2009 at 5:59 amGood point. This seems to work better for that situation:
L = thisComp.layer(“sun”);
P1 = L.toWorld(L.anchorPoint);
P2 = toWorld(anchorPoint);
V1 = normalize(P2 – P1);
V2 = toWorldVec([1,0,0]);
angle = radiansToDegrees(Math.acos(dot(V1,V2)));
(cross(V1,V2)[2] >0) ? -angle : angleDan
Reply to this Discussion! Login or Sign Up