Thanks for the response Dan!
I’ve gone the route of working on my (rather, your) bounce expression and I can’t seem to make it work. My code is pasted below.
What I did was create a ts variable that pulls from my “time scale” control. If time scale = 2 everything should go twice as fast (except for the bounce). Then I divided the key(n).time values by ts, thinking that would make the bounce expression kick in twice as early.
Where I think I get out of my depth is in the velocity calculation. I divided key(n).time by ts in the velocityAtTime code but that didn’t seem to help.
Finally I modified the else expressions to adjust with the time scale as well (but I’m 99% sure that’s not the problem.)
Any help you could provide would be greatly appreciated!
e = .7;
g = 2500;
nMax = 9;
ts = comp("_controller").layer("Controller").effect("time scale")("Slider")
n = 0;
if (numKeys > 0){
n = nearestKey(time).index;
if (key(n).time/ts > time) n--;
}
if (n > 0){
t = time - key(n).time/ts;
v = -velocityAtTime(key(n).time/ts - .001)*e;
vl = length(v);
if (value instanceof Array){
vu = (vl > 0) ? normalize(v) : [0,0,0];
}else{
vu = (v < 0) ? -1 : 1;
}
tCur = 0;
segDur = 2*vl/g;
tNext = segDur;
nb = 1; // number of bounces
while (tNext < t && nb <= nMax){
vl *= e;
segDur *= e;
tCur = tNext;
tNext += segDur;
nb++
}
if(nb <= nMax){
delta = t - tCur;
value + vu*delta*(vl - g*delta/2);
}else{
easeIn(time,0,1/ts,[400,200],[690,200])
}
}else
easeIn(time,0,1/ts,[400,200],[690,200])