ADOBE AFTER EFFECTS: Forum Expressions Tutorials Podcasts Creative Cloud

Re: return to position expression

COW Forums : Adobe After Effects Expressions

FAQ   •   VIEW ALL   •   ADD A NEW POST   •   PRINT
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 


Current Message Thread:





© 2016 CreativeCOW.net All Rights Reserved
[TOP]