Hello all,
I have been creating a day/night cycle for my game and have run into one issue. First, let me explain how I did it.
I have one instance called Day_Night. It is as big as the width of the viewport and square. One corner has the sun, the other has the moon and the image point is in the middle. It has the rotate behavior and is on a layer called Sun/Moon with parallax 0,0. Then is the Darkness object. It has the fade behavior and is programmed to fade in or out to match the sun/moon. It is also on layer 'Darkness,' which has 'force own texture' enabled and is parallax 100,100. This all works fine.
The problem is that the darkness layer is higher than the Sun/Moon layer and covers up the sun and moon. I have light instances that work like the 'Simple lighting example' project on the start page. They are on layer 'Darkness' so they pierce the darkness. I cannot get them to stay at the sun and moon, because they are on different layers with different parallaxes. I have tried the 'Every tick set position' and the pin behavior. Keep in mind that the sun and moon are one object and that I cannot move the layers around due to how my game works.
Any help with this will be appreciated.
Thanks, Give me a Pixel
Sun_Moon object: