A little update in the time it took to have the post approved:
With a software engineer colleague who ‘knew a little bit about javascript’ we managed to set up an expression, based on a snippet of code we found on the web:
min_distance=0;
max_distance=100;
n=this_comp.layer(“Layer Name”);
d=length(to_world(anchor_point), n.to_world(n.anchor_point));
ease(d, min_distance, max_distance, 100, 0)
Now, this works great, but I am still a little bit confused as to why the “to_world” is necessary, and why we were seeing a strange distance offset when we tried using “position” instead of “anchor_point”.
Can someone explain why “anchor_point” works when “position” does not, and why “to_world” is necessary at all? I’d like to get familiar with expressions.
Thanks!