Description
The EndDistance
property of the CubemapFogController
class specifies the distance from the player at which the fog effect reaches its full strength. This property is used to control the visual appearance of fog in a scene, allowing developers to create more immersive environments by adjusting how far the fog extends from the player.
Usage
To use the EndDistance
property, you need to have an instance of the CubemapFogController
class. You can set this property to a float
value representing the desired distance in the game world units. This value determines how far from the player the fog will be fully opaque.
For example, if you want the fog to be fully opaque at a distance of 100 units from the player, you would set EndDistance
to 100.0f.
Example
// Create an instance of CubemapFogController
CubemapFogController fogController = new CubemapFogController();
// Set the end distance for the fog to be fully opaque
fogController.EndDistance = 100.0f;
// Optionally, configure other properties
fogController.StartDistance = 50.0f; // Fog starts fading in at 50 units
fogController.Enabled = true; // Enable the fog effect