Description
The HeightWidth
property of the CubemapFogController
class specifies the distance between the start of the height fog and the point where it becomes fully opaque. This property is crucial for controlling the vertical blending of fog in a scene. By adjusting this value, developers can simulate different atmospheric effects based on height. Setting this property to 0
will disable height-based blending, effectively making the fog uniform regardless of height.
Usage
To use the HeightWidth
property, you need to have an instance of the CubemapFogController
class. You can then set this property to a float
value that represents the desired distance for height fog blending. A higher value will result in a more gradual transition from clear to foggy conditions as the height increases.
Example
// Create an instance of CubemapFogController
CubemapFogController fogController = new CubemapFogController();
// Set the HeightWidth property to control the height fog blending
double desiredHeightWidth = 50.0f;
fogController.HeightWidth = desiredHeightWidth;
// Check the current HeightWidth value
float currentHeightWidth = fogController.HeightWidth;
// Output: 50.0f