Hello! Just one more.
Does anyone know how to make a smooth transition from color to color over time?
I only have colors popping in instantly without a smooth transition or even a quick transition at least.
Thanks in advance!
Hello! Just one more.
Does anyone know how to make a smooth transition from color to color over time?
I only have colors popping in instantly without a smooth transition or even a quick transition at least.
Thanks in advance!
Check this:
ColorTransition.gdg (10.5 KB)
Just use the Lerp function to interpolate between each color component, from (r1, g1, b1) to (r2, g2, b2)
ceil( X ); = Round number example : ceil(1.1) = 2;
lerp( A ,B ,T ); = Make a transition between A and B, T is a value between 0 to 1, T change with the TimeDelta (second from last image, divide T by 5 gives us a animation transition will take 5 seconds)
in my example timer is reboot for make a loop transition
transitionLerp_color.gdg (10.8 KB)
Thank you very much, Lizard and Bouh for fixing the formula and providing some examples. Itβs much easier to understand now and I now know how lerp and ceil works. Never even heard of those terms before.