Activity › Forums › Adobe After Effects Expressions › Auto-orient along path doesn’t work when there’s a Position expression
-
Auto-orient along path doesn’t work when there’s a Position expression
Matthias Stoll replied 6 years, 7 months ago 4 Members · 12 Replies
-
Dan Ebberts
January 19, 2020 at 6:28 pmThis rotation expression should work (turn off auto-orient):
L=thisComp.layer(“Shape Layer 1”);
p=L.content(“Rectangle 1”).content(“Path 1”).path;
t = p.tangentOnPath(effect(“Slider Control”)(1),time);
radiansToDegrees(Math.atan2(t[1],t[0]))except when your slider gets to 1.0, so you may want to limit it to .999 or so.
Dan
Reply to this Discussion! Login or Sign Up