Subject: [AE] expressions: parent/move layer based on
proximity?
I'm trying to merge two expressions i've found, one that 'parents' a
layer's position to a master layer, and another that modulates a value based on
proximity. My goal is to have a master layer 'smear' the position of child
layers depending on how close they are. Sort
of like the way this AI tool works.
I believe the problem is in
the syntax of the last three lines where I try to combine the proximity value to
the parenting.
I get: ERROR: Class property has no method named
value
Any ideas what I'm doing wrong?
// get proximity //
// Point1 is current layer, point2 is control
layer point1=this_layer.position; point2=this_comp.layer("drag
me").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 n = linear(distance, 0, 40,20,
0);