-
Link x,y position of the light sweep to the rotation of a null
I have 84 layers, each with a light sweep applied that fakes a reflection as the layer rotates on the y axis. The rotation is controlled by a null to which all 84 layers are parented. The null always rotates in the same direction, so the degrees are constantly increasing, the speed and duration of each layer’s rotation is likely to change so I’m trying to link the position of the light sweep to the rotation keyframes of the null so when I need to revise the speed and duration later after client revisions I don’t have to also tweak the sweep keyframes.
I tried
r=thisComp.layer(“rot”).transform.yRotation;
x=linear(r,0,90,2700,1720);
y=linear(r,0,90,1640,880);
[x,y];But then the sweep position is still all the time, basically I don’t know how to rewrite the expression to account for the ever increasing rotation value.
Can anyone help me to write an expression for this?