Copy link to clipboard
Copied
I'm using loop out expretion for a fan to continously loop.
But I want it to stop with ease after looping for maybe 2 seconds,
start continuing backwards with ease then regain speed.
This explains the issues with speed control:
https://www.motionscript.com/articles/speed-control.html
What you'd want to do is use the linear keyframe integrator expression and key frame your slider to go forward, slow to a stop, then back up. Here's the expression, for reference:
spd = effect("Slider Control")("Slider");
n = spd.numKeys;
if (n > 0 && spd.key(1).time < time){
accum = spd.key(1).value*(spd.key(1).time - inPoint);
for (i = 2; i <= n; i++){
if (spd.key(i).time > time) break
...
Copy link to clipboard
Copied
This explains the issues with speed control:
https://www.motionscript.com/articles/speed-control.html
What you'd want to do is use the linear keyframe integrator expression and key frame your slider to go forward, slow to a stop, then back up. Here's the expression, for reference:
spd = effect("Slider Control")("Slider");
n = spd.numKeys;
if (n > 0 && spd.key(1).time < time){
accum = spd.key(1).value*(spd.key(1).time - inPoint);
for (i = 2; i <= n; i++){
if (spd.key(i).time > time) break;
k1 = spd.key(i-1);
k2 = spd.key(i);
accum += (k1.value + k2.value)*(k2.time - k1.time)/2;
}
accum += (spd.value + spd.key(i-1).value)*(time - spd.key(i-1).time)/2;
}else{
accum = spd.value*(time - inPoint);
}
value + accum
Copy link to clipboard
Copied
I'm very new to coding and this is a bit difficult for me to digest.
But I love challenge and this made my day !
Thank you !
Copy link to clipboard
Copied
If you get stuck, just ask.
Copy link to clipboard
Copied
Thank you 🙏
Find more inspiration, events, and resources on the new Adobe Community
Explore Now