Description
The ConeOuter
property of the SpotLight
class defines the outer angle of the spotlight's cone in degrees. This property determines how wide the light spreads from the spotlight's source. The value is constrained between 0 and 90 degrees, ensuring that the light does not spread beyond a hemisphere.
Usage
To adjust the outer cone angle of a spotlight, set the ConeOuter
property to a desired value within the range of 0 to 90. This will affect how the light is distributed from the spotlight, with larger values resulting in a wider spread of light.
Example
// Create a new SpotLight instance
SpotLight mySpotLight = new SpotLight();
// Set the outer cone angle to 45 degrees
mySpotLight.ConeOuter = 45.0f;
// Ensure the value is within the valid range
if (mySpotLight.ConeOuter < 0 || mySpotLight.ConeOuter > 90)
{
throw new ArgumentOutOfRangeException("ConeOuter must be between 0 and 90 degrees.");
}