self:set_attenuation

Client

Sets the attenuation curve exponent of the spot light, which controls how light intensity falls off with distance


Syntax

local status = self:set_attenuation(
    attenuation
)

Parameters

TypeNameDescription
floatattenuationAttenuation exponent to apply

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Set the attenuation of a spot light
local entity = light.spot.create()

entity:set_attenuation(1.0)

On this page