So, i’m trying to create an effect similar to this one, where stars rotate in the sky leaving star trails behind. My idea was the following:
Add an overlay Camera on top of the Background which render only objects in the “Stars” layer. Create a game object called “Stars” with a 2D sprite of the stars. Add a script rotating the stars. Set the CameraClearFlags of the Stars camera as CameraClearFlags.Nothing.
Well, that’s what i did. I set up a script with the following:
cam = GetComponent<Camera>();
cam.clearFlags = CameraClearFlags.Nothing;
I of course set this up at the Stars camera and hit play but it did nothing. The stars just rotated normally. I then added the same script to my base camera to see what has happening. Nothing. Nothing even changes. I added to ALL my other cameras and nothing happened again.
Why??