-
sampleimage
I was playing with Dan’s sampleimage expressions, and would like to have the alpha value of a specified layer control the rotation of a layer.
I pasted this expression on the Y-axis of my layer…
target = thisComp.layer(“background”);
a=target.sampleImage(transform.position, [width, height]/2, true, time)[3];
linear(a, 0, 0.36, 0, 180)But get this error: sampleimage() must be 2 numbers
What am I doing wrong? Was I close?