ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Re: Expressions: bounce version of this overshoot Expression Selector code for text?

COW Forums : Adobe After Effects

FAQ   •   VIEW ALL   •   ADD A NEW POST   •   PRINT
Respond to this post   •   Return to posts index   •   Read entire thread


Paul Hasas
Re: Expressions: bounce version of this overshoot Expression Selector code for text?
on Sep 29, 2019 at 6:57:40 pm

Wasn't gonna bother posting my duct-taped bounce variant, but here it is. This is the one that gets me closest to a working result. The problem is, after the initial bounces stop, they start up again and keep jumping higher and higher.

bounces = 5;
decay = 2;
delay = .2; // delay between animation of nearest units
dur = .3; // unit animation duration

myDelay = (textIndex - 1) * delay;
t = time - (inPoint + myDelay);
startVal = 200;
endVal = 0;

freq = 1 / dur;
mult = (bounces - Math.floor(t * freq)) / bounces;

if (t < dur) {
linear(t, 0, dur, startVal, endVal);
} else {
amp = (endVal - startVal) / dur;
endVal - (amp / 10) * (Math.abs(Math.sin(freq * t * Math.PI)) * Math.pow(mult, decay));
}


Posts IndexRead Thread 


Current Message Thread:





© 2020 CreativeCOW.net All Rights Reserved
[TOP]