Description
The StartDistance
property of the CubemapFogController
class specifies the distance from the player at which the fog effect begins to fade in. This property is crucial for controlling the visual transition of fog in a scene, allowing developers to create more immersive environments by adjusting how and when fog appears relative to the player's position.
Usage
To use the StartDistance
property, you need to have an instance of the CubemapFogController
class. You can then set this property to a float
value representing the desired start distance for the fog effect. This value should be greater than or equal to zero.
Example usage:
var fogController = new CubemapFogController();
fogController.StartDistance = 50.0f; // Fog starts fading in at 50 units from the player
Example
// Create an instance of CubemapFogController
CubemapFogController fogController = new CubemapFogController();
// Set the start distance for the fog effect
fogController.StartDistance = 100.0f;
// Optionally, configure other properties
fogController.EndDistance = 200.0f;
fogController.Enabled = true;
fogController.Tint = new Color(0.5f, 0.5f, 0.5f, 1.0f);