Hi all, I have a Lighting layout which works based on a timer. However I would like to scrap the timer and replace it with something a bit more too advanced for my small head.
I have attached an image of a sun and the planet that the player will be on.
I am trying to make it so that when the planet is going behind the sun that the layout lighting will have its opacity changed based on this and vice versa for infront. Of course the Lighting layer opacity shouldn't at a click of a finger become night, I'd like a transition effect.
Does anyone know the best way of achieving this please ?
The Sun is a stationary sprite with a rotate behaviour (It has no path of direction) The planet moves based on the Sine horizontal movement method.
The way I have the planet appearing in front and behind the sun is by using invisible objects. If the planet overlaps either of them, depending on what they are, the planet is either set at the back of the layer or infront.
Here are some images.
imgur.com/a/AQfUPs8
imgur.com/a/tdSHPMS
Thank you, I hope you can help.