Udostępnij za pośrednictwem


SpotLight.ConstantAttenuation Property

Definition

The constant coefficient in the light's attenuation equation. Controls light intensity. Animatable.

public:
 property float ConstantAttenuation { float get(); void set(float value); };
float ConstantAttenuation();

void ConstantAttenuation(float value);
public float ConstantAttenuation { get; set; }
var single = spotLight.constantAttenuation;
spotLight.constantAttenuation = single;
Public Property ConstantAttenuation As Single

Property Value

Single

float

The constant coefficient in the light's attenuation equation. Controls light intensity. Range is from 0 to infinity.

Examples

_spotLight.ConstantAttenuation =1; 

Remarks

The SpotLight.ConstantAttenuation property is part of the attenuation equation which also includes SpotLight.LinearAttenuation and SpotLight.QuadraticAttenuation:

1/(Constant+Linear*(Distance/100)+Quadratic*(Distance/100)*(Distance/100))

Applies to

See also