Hey all, it always happens that all i need to do is post to the cow, and 5 minutes later I’ll figure it out 😉
Thanks to this site: https://www.jjgifford.com/expressions/geometry/length.html
I found this script:
// Point1 is current layer, point2 is control layer
point1=this_layer.position;
point2=thisComp.layer(“ARROW”).position
// Find the vector between the 2 points
delta=sub(point1, point2);
// Now find the length
distance=length(delta);
//Use linear() to remap distance to range of 40 to 0
linear(distance, 0, 80, [250,250], [75,75]);