• | **How to use both inertia and wiggle expression on the same property?**
on Mar 15, 2018 at 4:55:35 pm Last Edited By Cory May on Mar 15, 2018 at 5:00:00 pm |

I'm working on a lyric video for some friends in a band, and I'm trying to use a wiggle expression on the position of the null the camera is attached to. I also want the camera to bounce a bit when coming to a stop after moving around. I'm assuming that both of these expressions would be used on the null's position but can't for the life of me figure out how. Any solutions?

Edit: I should have specified that I know how to use both the wiggle and inertia expressions, just not sure how to combine them.

• | **Re: How to use both inertia and wiggle expression on the same property?** on Mar 15, 2018 at 5:50:23 pm |

It would help if you included the expressions in your post.

Dan

• | **Re: How to use both inertia and wiggle expression on the same property?** on Mar 15, 2018 at 6:02:25 pm |

Thanks Dan, I'm pretty new to this. This is the inertia expression and I just use a basic wiggle(x,x) expression. I may be going about this all wrong perhaps?

`amp = 5.0; freq = 2.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 && t < 1) {

v = velocityAtTime(key(n).time - thisComp.frameDuration/10);

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

}

else { value; }

• | **Re: How to use both inertia and wiggle expression on the same property?** on Mar 15, 2018 at 7:39:48 pm |

Something like this maybe:

w = wiggle(1,25) - value;

amp = 5.0; freq = 2.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 && t < 1) {

v = velocityAtTime(key(n).time - thisComp.frameDuration/10);

value + v*(amp/100)*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t) + w;

}

else { value + w; }

Dan