self:get_attenuation

Client

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


Syntax

local attenuation = self:get_attenuation()

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
floatattenuationCurrent attenuation exponent

Examples

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

core.engine.print("info", "Spot light attenuation:", entity:get_attenuation())

On this page