This is a question I’ve found myself asking lately too. How does one change values at a specified time, but using a smooth animation, rather than a drastic jump. I’ve been noodling it, and I’m sure it’s something like:
if(time >= someValue) {
linear(time, time, time+animationDurationInFrames, value01, value02);
}
but I can’t quite grasp what I’m missing.
I was playing with a rotation value today that it would have been nice to have this. I want to rotate between (let’s just say) 0 degrees and 10 degrees over the course of 10 seconds, and then, in 30 frames, I want to complete the rotation back to 0 degrees from 10 degrees, and then continue the move from 0 degrees to 10 degrees over the course of the next 10 seconds.
My gut tells me there’s a modulus equation that’ll get me what I want, but yet again, it’s eluding me. It’d be something like…
duration = 300;
if(duration % 300 == 0) smoothly animate expression that’s probably linear(something);