ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

inertial bounce and parented delay on position

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Hannes Seth
inertial bounce and parented delay on position
on Jun 2, 2020 at 3:53:00 pm

hi there,

I'm looking for a way to combine two expressions for the position of a layer:
inertial children bounce and parented delay.
I'm guessing there's an easy way to achieve this, but I don't know how to do it.
any help appreciated.

thanks in advance

n = 0;
amp = .04;
freq = 2.0;
decay = 3.0;

ppos=thisLayer.parent.transform.position;
if (ppos.numKeys > 0){
n = ppos.nearestKey(time).index;
if (ppos.key(n).time > time){
n--;
}
}
if (n == 0){
ppos.velocity
t = 100;
}else{
t = time - ppos.key(n).time;
}

if (n > 0){
v = ppos.velocityAtTime(ppos.key(n).time - thisComp.frameDuration/10);

value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
}else{
value
}


------------------------------------

delay = .05;
parent.fromWorld(toWorld(anchorPoint,time-delay))


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2020 CreativeCOW.net All Rights Reserved
[TOP]