-
how to reset a value at a certain time
Hi guys, i have a bit of a quandry herei wonder if you could help me.
i have a null object that starts off +3000 on the z axis.
It the uses time to increment the z position coming toward the camera.
Once it reaches +3000 i wish to reset the z position to -3000 and let the loop begin again.It works fine however when it gets over -3000, it resets to 3000 and stays there.
i have attached my code, any help would be great.
cheers
christ=time;
a= thisComp.layer("Null").position[0];
b= thisComp.layer("Null").position[1];
c= thisComp.layer("Null").position[2]-(t*500);if(c <= -3000) {
c=3000;
t=0;
}
[a,b,c]