FORUMS: list search recent posts

how apply inertial bounce on parented layer

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Fernando Huezo
how apply inertial bounce on parented layer
on May 20, 2015 at 5:38:24 pm

Hi there!
I need help with something
I want know how to apply a inertial bounce expression on parented layer
I tried only apply the expression but it does not work, only using keyframes in the own layer.
Some idea?


Return to posts index

Dan Ebberts
Re: how apply inertial bounce on parented layer
on May 20, 2015 at 7:22:13 pm

Assuming the keyframes are on the layer's parent's position property, something like this could work:


freq = 3;
decay = 5;

p = parent.transform.position;
n = 0;
if (p.numKeys > 0){
n = p.nearestKey(time).index;
if (p.key(n).time > time) n--;
}
if (n > 0){
t = time - p.key(n).time;
p1 = toWorld(anchorPoint,p.key(n).time);
p0 = toWorld(anchorPoint,p.key(n).time - .01);
amp = (p1 - p0)/.01;
w = freq*Math.PI*2;
value + amp*(Math.sin(t*w)/Math.exp(decay*t)/w);
}else
value


Dan



Return to posts index

Fernando Huezo
Re: how apply inertial bounce on parented layer
on May 20, 2015 at 8:10:32 pm

Its works!
I just change the P value for the slider that control the X position, Here is where are the keyframes, I guess that is much easier if I apply the values on the null position and define the lowest and highest distance.

Thank you very much!


Return to posts index

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