The Ultimate Guide to Sun and Moon Positioning in Super Simple Skybox for Unity
May 30, 2023
Super Simple Skybox is a powerful asset for the Unity game engine that allows developers to create stunning, interactive skiess. The latest update, version 3.0.0, brings exciting new features and improvements, including the replacement of SetSunPosition.cs withDirectionalLight.cs, and the addition of two new components, Sun.cs and Moon.cs. These new components make it easier than ever to position the sun and moon independently of each other, allowing for even greater control and customization in your Unity projects.
The DirectionalLight.cs component is the cornerstone of the new sun and moon positioning system in Super Simple Skybox. This component serves as the base class for both the Sun.cs and Moon.cs components, and provides a simple and intuitive way to manage the position and intensity of your lighting. To use the DirectionalLight.cs component, simply add it to your game object and set the position and intensity values as needed.
The Benefits of Sun.cs and Moon.cs
The Sun.cs and Moon.cs components inherit from DirectionalLight.cs, and bring a number of new and exciting features to your Unity projects. These components make it easy to position the sun and moon independently, giving you greater control over your lighting and helping you create truly stunning and immersive experiences.
In addition to independent positioning, the Sun.cs and Moon.cs components also come equipped with events for sunrise, sunset, moonrise, and moonset. This makes it simple to subscribe to these events and create dynamic and responsive lighting systems in your projects. Get the relevant component (e.g., FindObjectOfType<Sun>()), then call subscribe to the OnRise or OnSet event from that component. Here's an example:
Star Rotation with SetStarRotation.cs
The latest update to Super Simple Skybox for Unity also brings the SetStarRotation.cs component, which makes it easy to handle star rotation independently. This component is typically added to the same game object as Sun.cs, and provides a simple and intuitive way to control the rotation speed of your stars.
Automatic Shadows and Intensity
One of the most exciting features of the new sun and moon positioning system in Super Simple Skybox is the automatic handling of shadows and intensity. The sun and moon now automatically adjust their intensity and shadow settings based on their position relative to the zenith, making it easier than ever to create stunning and realistic lighting systems in your Unity projects.
The latest update to Super Simple Skybox brings a number of exciting new features and improvements to the sun and moon positioning system, including the replacement of SetSunPosition.cs with DirectionalLight.cs, the addition of the Sun.cs and Moon.cs components, and the introduction of the SetStarRotation.cs component. With these new tools, it's easier than ever to create truly stunning and immersive lighting systems in your Unity projects.
Unity 2022 LTS: Empowering Game Developers and Artists
Unlock your creative potential with Unity 2022 LTS. Discover the new features and improvements for artists and programmers, and create high-quality games.
Introducing Responsive Smoke: Interactive Volumetrics in Unity
Discover Responsive Smoke: A Unity asset that brings dynamic, interactive volumetric smoke effects to your projects. Read on to explore its features.
Text Mesh Pro in Unity: Font Import Guide
Learn how to import and use Text Mesh Pro fonts in Unity. Enhance your text elements with advanced features and improved visual quality.