Description
The EndHeight
property of the GradientFogController
class specifies the height at which the fog effect ends. This property is used to define the vertical extent of the fog, allowing for a gradient effect from the StartHeight
to the EndHeight
. The value is represented as a float
and is typically used in conjunction with other fog properties to create realistic atmospheric effects in a scene.
Usage
To use the EndHeight
property, you need to have an instance of the GradientFogController
class. You can set this property to control the vertical limit of the fog effect in your scene. Adjusting this value will affect how the fog appears in relation to the height of objects in the scene.
Example
// Create an instance of GradientFogController
GradientFogController fogController = new GradientFogController();
// Set the end height of the fog
fogController.EndHeight = 100.0f;
// Optionally, configure other properties
fogController.StartHeight = 0.0f;
fogController.StartDistance = 10.0f;
fogController.EndDistance = 200.0f;
fogController.MaximumOpacity = 0.8f;
fogController.Color = new Color(0.5f, 0.5f, 0.5f);
// Use the fog controller in your scene
// This might involve adding it to a scene or applying it to a camera or environment settings.