gradual color transition from blue to black and back to blue
jorkos
Member, PRO Posts: 353
Hey guys, i'm working on an endless flying game and I want the background color to slowly transition from daytime to nightime and back. I am using the scene color and it starts blue (RGB: 0.74,1,1). How would I gradually transition this color to black and back over a time period (say 120 seconds). Thank you so much for your help
Comments
You could use Interpolate Behaviors to interpolate the RGB values of the scene color over time. An alternate method would be to create an image and interpolate its alpha so it fades in and out to give you the color change.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
Make a black actor that fills the screen, then constrain this actor's alpha channel to:
0.5 *sin( self.Time )+0.5
This will take 120 seconds to go from blue to black and then back to blue again.