-
Fade back out when equal to a value..
Hi everyone,
I have a layer fading in based on the distance to the camera. So the layer goes from 0 to 30% opacity based on the camera distance. But after the layer hits a 30% opacity threshold, I then want the layer to automatically fade back out after X amount of time.
Here is the current expression, which will fade in the layer up to 30%
start = thisComp.layer(“Control”).effect(“FadeStart”)(“Slider”);
end = thisComp.layer(“Control”).effect(“FadeEnd”)(“Slider”);
C = thisComp.layer(“HandyCam_Camera”);
CameraPos = C.toWorld([0,0,0]);
LayerPos = toWorld(anchorPoint);
Difference = length(CameraPos, LayerPos);
ease(Difference, start, end, effect(“Gradation End”)(“Slider”), effect(“Gradation Start”)(“Slider”))I just don’t know how to have it automatically fade back out after X amount of time.
Any suggestions?
Thanks,
John