View all expressions
Interpolation

Scale Based On Distance

Calculates the distance between two layers and then affects a property based on it.

targetLayer = thisComp.layer("TargetLayer");
dist = length(thisLayer.position, targetLayer.position);

value * (1 + dist / 500);
Scale Based On Distance

Practical use case

Calculates the distance between two layers and then affects a property based on it.

Check out similar expressions

Data-driven video workflows for After Effects are easier with Plainly.

a mesh of elegant lines transparent image