Z Position Fade Out Expression

//USE Z POSITION RANGE TO CONTROL OPACITY:
fullOnZ = -900; //z value where you want opacity to be 100%;
fullOffZ = 2700; //z value where you want opacity to be 0%;

num = 100-(100*(transform.position[2]+(fullOnZ*-1))/fullOffZ);

//this step allows you to keep existing opacity keyframes
//by adding our formula result to the existing opacity
num = num * (transform.opacity/100);
value = num;
0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published.