Hi,
I am quite a noob when it comes to expressions.
Basically what I am trying to achieve is to connect your Expression (what perfectly does what I need) with an inertial Bounce.
I want a layer to move in fixed intervals but also have a bounce at the end position. And I don’t want to use keyframes.
I have been using the inertial Bounce Expression from Graymachine which is based on keyframes.
But I am to stupid to find a way to connect these Expressions.
Do you know how to do this?
Thank you!
So I want to connect this:
timeToClimb = 1;
timeToStay = 2;
initialY = 243;
positionY = initialY - 5 * Math.floor(time / (timeToClimb + timeToStay));
t = time % (timeToClimb + timeToStay);
[432, linear(t, 0, timeToClimb, positionY, positionY - 5)]
with this:
amp = .05;
freq = 1.0;
decay = 4.0;
n = 0;
if (numKeys > 0){
n = nearestKey(time).index;
if (key(n).time > time){
n--;
}}
if (n == 0){ t = 0;
}else{
t = time - key(n).time;
}
if (n > 0){
v = velocityAtTime(key(n).time - thisComp.frameDuration/10);
value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
}else{value}