float Radius { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Radius property of the SpotLight class defines the effective range of the spotlight. It determines how far the light emitted from the spotlight will reach. This property is crucial for controlling the area of illumination in your scene.

Usage

To adjust the Radius of a SpotLight, simply set this property to a desired float value. The value should be a positive number representing the distance in units that the light will cover.

Example

// Create a new SpotLight instance
SpotLight mySpotLight = new SpotLight();

// Set the radius of the spotlight to 10 units
mySpotLight.Radius = 10.0f;

// Add the spotlight to the scene
Scene.Add(mySpotLight);