Description
The ConstantAttenuation
property represents the constant term in the light attenuation equation for a SceneLight
object. This term affects how the light intensity diminishes over distance. A higher constant attenuation value means the light will maintain its intensity over a greater distance, while a lower value will cause the light to diminish more quickly.
Usage
To use the ConstantAttenuation
property, you can get or set its value on a SceneLight
instance. This property is a float
and can be adjusted to control the light's behavior in your scene.
Example
// Create a new SceneLight instance
SceneLight myLight = new SceneLight();
// Set the constant attenuation to a specific value
myLight.ConstantAttenuation = 1.0f;
// Retrieve the current constant attenuation value
float currentAttenuation = myLight.ConstantAttenuation;
// Output the current attenuation value
// Note: Avoid using Console.WriteLine in Sandbox
// Instead, use in-game debugging tools or UI elements to display values