Custom Skybox Script

Hi folks!

I’m trying to implement a custom skybox/skydome system. Currently I have to attach my skydome to the scene’s main camere in order to prevent the player from reaching the skydome’s geometry.
But this approach doesn’t work when having multiple cameras in a scene. Is there a way I can reset the skydome’s center just before a Camera renders the scene?

Best Regards!

Of course you can. Try looking into this :

You need some kind of OnPreCull-event? Why not using the OnPreCull event :smiley:

You need to attach the script to every camera of course and use Camera.current in the OnPreCull function