OK – here’s my entry 8^>. It seems to work for all conditions I can think of. The key setup variables are cw (true if rotating clockwise) and uv ([0,-1] if radar line starts out pointing up, [0,1] if down, [1,0] if right, [-1,0] if left).
fadeAngle = 90;
maxOpacity = 100;
minOpacity = 0;
cw = false; // true if clockwise rotation, false if ccw
uv = [0,-1]; // unit vector representing initial orientation of radar line
line = thisComp.layer(“RadarLine”);
v = normalize(position – line.position);
u = line.toWorldVec(uv);
d = cross(v,u)[2] > 0;
angle = radiansToDegrees(Math.acos(dot(v,u)));
if ((cw && d) || (!cw && !d)) linear(angle,0,fadeAngle,maxOpacity,minOpacity) else minOpacity
Dan