Creative COW SIGN IN :: SPONSORS :: ADVERTISING :: ABOUT US :: CONTACT US :: FAQ
Creative COW's LinkedIn GroupCreative COW's Facebook PageCreative COW on TwitterCreative COW's Google+ PageCreative COW on YouTube
ADOBE AFTER EFFECTS:HomeForumBasicsExpressionsTutorialsPodcastsAE TechniquesCreative Cloud DebateFAQ

Re: return to position expression

COW Forums : Adobe After Effects Expressions

FAQ   •   VIEW ALL   •   ADD A NEW POST   •   PRINT
Share on Facebook
Respond to this post   •   Return to posts index   •   Read entire thread


Dan EbbertsRe: return to position expression
by on Aug 19, 2011 at 5:47:03 pm

This should do what you want:


C = thisComp.layer("Controls");
move = C.effect("x axis")("Slider");
dist = C.effect("dist")("Slider");
cPos = C.position;
delta = Math.abs(cPos[0] - position[0]);
value + [0,0,ease(delta, 0, dist, -10*move,0)]


Delete the minus sign in the last line if you wanted the layer to move away from the camera.

Dan



Posts IndexRead Thread
Reply   Like  
Share on Facebook


Current Message Thread:




LOGIN TO REPLY



FORUMSTUTORIALSFEATURESVIDEOSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

Creative COW LinkedIn Group Creative COW Facebook Page Creative COW on Twitter
© 2014 CreativeCOW.net All rights are reserved. - Privacy Policy

[Top]