Creative COWSIGN 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
Social ShareSend Email MessageShare on FacebookShare on TwitterShare on LinkedInComment
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  
+1
Social ShareSend Email MessageShare on FacebookShare on TwitterShare on LinkedInComment


Current Message Thread:




LOGIN TO REPLY



FORUMSTUTORIALSFEATURESPODCASTSEVENTSSERVICESJOBSNEWSLETTERNEWSBLOGS

Creative COW LinkedIn GroupCreative COW Facebook PageCreative COW on Twitter
Social ShareSend Email MessageShare on FacebookShare on TwitterShare on LinkedInComment
© 2016 CreativeCOW.net All rights are reserved. - Privacy Policy

[Top]