-
When using the “if” expression to limit the value, strange jumps occur, how to solve?
Hi all!
I animate the size of ” Layer 1″ from 0% to 100%, then I want ” Layer 2″ to follow ” Layer 1″ for animation, but with a delay of 2 seconds and multiplying by 1.5 (Speed up animation).
The result of this ” Layer 2″ will eventually be enlarged to 150%, but I only want to zoom to 120%, so I used the following expression:
va1 = thisComp.layer(" Layer 1").transform.scale
va2 = va1.valueAtTime ( time - .2 )*1.5;
max= [120,120];
if ( va2 < max ) { va2 } else { max }However, this expression has a very strange jitter and it is not possible to constrain ” Layer 2″ to 120% of the size.
If you change 1.5 directly to 1.2, the speed of this process will be much slower.My English is not very good. If there is any place that you don’t understand, please let me know and I will try my best to answer it.
Thank you for your time and advice