Answered
Bounce Expression error on Path morphing?
Hello
Would like to know if I'm doint anything wrong, because I'm trying to make my shape bounce when morphed, but I get an error message.
How could I solve this issue?
Thank you!

Hello
Would like to know if I'm doint anything wrong, because I'm trying to make my shape bounce when morphed, but I get an error message.
How could I solve this issue?
Thank you!

This path overshoot expression might be helpful in some situations. It assumes that the number of points doesn't change and it doesn't apply any bounce to the tangents.
freq = 3;
decay = 5;
val = value;
if (numKeys > 0){
n = nearestKey(time).index;
if (time < key(n).time) n--;
if (n > 0){
path = thisProperty;
pNow = path.points(time);
p1 = path.points(key(n).time);
p0 = path.points(key(n).time - thisComp.frameDuration);
p = [];
dur = thisComp.frameDuration;
t = time - key(n).time;
for (i = 0; i < p1.length; i++){
amp = (p1[i] - p0[i])/dur;
w = freq*Math.PI*2;
p.push(pNow[i] + amp*(Math.sin((t)*w)/Math.exp(decay*(t))/w));
}
val = createPath(p, path.inTangents(), path.outTangents(), path.isClosed())
}
}
valAlready have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.