-
Opacity fade in/out based on speed
Hello !
I’m trying to figure out to put a fade in and a fade out on the opacity of a layer depending of the speed of differents layers.
So, there is a layer A moving, when it’s speed hit 0, the opacity of the other layer goes to 100 until it’s own speed goes to 0, then it’s fade to 0 again.
I managed to have the 0 to 100 and back to 0 (see the expressioon below the post)
But the fade in fade out do not work. I naively thought that adding somthing la “ease (time, 0,100,0,100)” would get me a fade in. Obviously not.
I tried a variation with this, but no luck either.
alphaVelo = comp(“Game_Spin 2”).layer(“Ref_Reel_Alpha”).transform.yPosition.speed;
suspensVelo = comp(“Game_Spin 2”).layer(“Ref_Reel_2”).transform.yPosition.speed;if ((alphaVelo == 0) && (suspensVelo != 0));
if (suspensVelo != 0);
{(ease(time,0,100,0,100))};
if (suspensVelo == 0)
{(ease(time,100,0,100,0))};
else {0};I’m still trying to plug my mind into that coding univers and I m slowly breaking into it, but still need help ☺
Kind Regards to all of you 🙂
// kind of working expression.alphaVelo = comp("Game").layer("A").transform.yPosition.speed;
suspensVelo = comp("Game").layer("B").transform.yPosition.speed;if ((alphaVelo == 0) && (suspensVelo != 0)) {100}
else (0)
