Thought I’d share a fun experiment for anyone who wants to learn cool after effects expressions! (You can download the file here.)
The following animation uses just 3 keyframes:
Everything in this animation is based on the position of a layer that I’ve named “Target”. When I move the target layer, things scale up as it comes near.
You can see here how the target layer effects the circle:
One last example here of the control/target layer effecting multiple circles:
All these examples are available for download here.
I’ll also put the expression below for those of you who like to copy/paste:
//The target is your main layer. This is the layer that controls everything else.
//Replace the word “Target” with whatever you’ve named your main control layer
target = thisComp.layer(“Target”);
//How far away your target layer is from this layer.
dist = Math.floor( length(position, target.position) );
//when the this object is closest, this is how big it can get?
maxSize = 33;
//How small should your layer get?
minSize = 10
//how far can the target be before this layer starts to get bigger.
range = target.effect(“range”)(“Slider”);
// how fast the layer starts to scale up once the target is in range.
sensitivity = target.effect(“sensitivity”)(“Slider”);
//”linear” allows us to put in all our parameters and get a value back
scle = linear(dist, range, sensitivity, maxSize, minSize);
//The final result