Description
The ConeInner
property of the SceneSpotLight
class represents the inner cone angle of the spotlight, measured in half angle degrees. This property defines the angle within which the light is at its full intensity. Beyond this angle, the light intensity begins to fall off until it reaches the outer cone angle defined by the ConeOuter
property.
Usage
To use the ConeInner
property, you need to have an instance of the SceneSpotLight
class. You can get or set this property to adjust the inner cone angle of the spotlight. Ensure that the ConeInner
value is less than or equal to the ConeOuter
value to maintain a valid spotlight configuration.
Example
// Create a new SceneSpotLight instance
SceneSpotLight spotLight = new SceneSpotLight();
// Set the inner cone angle to 15 degrees
spotLight.ConeInner = 15.0f;
// Ensure the outer cone is larger than the inner cone
spotLight.ConeOuter = 30.0f;
// Access the inner cone angle
float innerConeAngle = spotLight.ConeInner;
// Output the inner cone angle
// Note: Avoid using Console.WriteLine in Sandbox
// Use appropriate logging or debugging methods instead
// Log.Info($"Inner Cone Angle: {innerConeAngle}");