This After Effects tutorial presents the bounce expression, which is convenient for adding a bouncing motion to layer parameters.
The roots of this expression derive from the great Dan Ebberts. I like to apply this expression to add realistic inertial movement. Use sliders to control the amplitude, frequency, and decay variables in the expression.
Amplitude is the amount of bounce. Frequency is how frequently the bounce happens. Decay is like friction. The more you apply, the less the bounce lasts.
Alt-Click (Windows) or Option-Click (Mac) the stopwatch next to a layer property, such as position or scale, to add an expression.
Type in your values for the variables, linking them to the slider.
Consider renaming your sliders so they’re easy to decipher. amp = effect(“Amplitude”)(“Slider”); freq = effect(“Frequency”)(“Slider”); decay = effect(“Decay”)(“Slider”); Then, add the bounce expression (pasted in comments).
Finally, you can add keyframes to your property and the bounce expression will add the inertial motion to your movements based on the value of your sliders. This expression can be added to multiple properties for a combined effect.