-
Calculating overshoot for a linear expression that’s referencing another layer
Hi!
I hope someone can help me with this because it’s driving me nuts!
I have a set of layers that rotate from 180-0 based on another layer’s X position plus or minus the rotating layer’s position. In other words, as the moving layer approaches the rotating layer’s position it starts to rotate then completes the rotation once the moving layer gets past a certain point.
I have this expression on the rotating layers’ Y rotation property:
ease(thisComp.layer(“movement”).transform.position[0], transform.position[0]-400, transform.position[0]+240, 180,0);
I’d like an overshoot expression added to the Y rotation property. But as you can see the Y rotation is driven by a linear expression and inside the linear expression I’m referencing another layer’s position (which is keyframed). So, I’m guessing the overshoot can’t be based on time (time-inPoint) and the overshoot can’t be based on keyframes because the Y rotation isn’t keyframed?
I was trying to play with this expression from Dan Ebbers site but I couldn’t figure out how to make it work with my current set up
freq = 3;
decay = 5;t = time – inPoint;
startVal = [0,0];
endVal = [200,200];
dur = 0.1;
if (t < dur){
linear(t,0,dur,startVal,endVal);
}else{
amp = (endVal – startVal)/dur;
w = freq*Math.PI*2;
endVal + amp*(Math.sin((t-dur)*w)/Math.exp(decay*(t-dur))/w);
}Maybe it’s lack of sleep but I can’t wrap my brain around this problem… maybe it’s just not possible?
Thanks in advance to anyone who can help!
freq = 3;
decay = 5;t = time - inPoint;
startVal = [0,0];
endVal = [200,200];
dur = 0.1;
if (t < dur){
linear(t,0,dur,startVal,endVal);
}else{
amp = (endVal - startVal)/dur;
w = freq*Math.PI*2;
endVal + amp*(Math.sin((t-dur)*w)/Math.exp(decay*(t-dur))/w);
}After Effects template maniac
https://www.fluxvfx.com/
