-
Trigger linear Interpolation
Hello,
I’m attempting to trigger a 2-second opacity increase from (100 to 0) on a layer as soon as it’s y position exceeds 1000.
This only needs to occur once on each layer it is applied to. After much thought, experimentation and reading I’m stumped but believe it’s achievable.
Below is the expression I’m using on the layers opacity property. Any help or wisdom is greatly appreciated.
Thank you.
yPos = transform.position[1];
start = inPoint+time;
end = inPoint+(time+fadeDur);
fadeDur = 2;
lin = linear(time,start,end,100,0);if (yPos > 1000) {
lin
} else {
100
}
;