-
Reading distance from object
Hey everyone!
I have a problem. I’m having an expression to read distance between two layers and changing the opacity of other of the layers with an ease.
My problem is that the distance is between the anchorpoints of the objects. I need somehow the “position” of the master layer to be the actual shape of that layer, not the anchorpoint position. I mean as I move the master layer, it changes the opacity around it, not only around it’s anchorpoint.
Is this even possible or do I have to give up with this? Hope you guys can help. ☺
– Hiski
master = thisComp.layer("haka1");
beginOp = [0];
endOp = [100];
beginDistance = 300;
endDistance = 10;
distance = length(this.position, master.position);
ease(distance, beginDistance, endDistance, beginOp, endOp)