Expression Copied to Clipboard! 🗂
← Back to Expressions

# Wiggle Between Two Values - After Effects Expression

Wiggle randomly between two values.

## Wiggle Between Two Values

min = -10; // minimum value
max = 50; // maximum value
freq = 5; // wiggles per second
amp = Math.abs(max-min)/2; // amount to wiggle
offset = (max+min)/2;
wiggle(f, a) + offset;

``````min = -10; // minimum value
max = 50; // maximum value
freq = 5; // wiggles per second
amp = Math.abs(max-min)/2;
offset = (max+min)/2;
wiggle(f, a) + offset;``````

We all love the Wiggle Expression. But have you ever wondered how to use it in a more controlled setting?

This expression allows you to make a property oscillate and wiggle between two set values (the min and max)

Just paste the expression to whatever property you want to control.

Then set the min/max variables to whatever values you want (these could even be pickwhipped to an expression control or another layer.)

min = -10; // minimum value
max = 50; // maximum value