SetSourceLength - GalaxHD551/lightstreamer GitHub Wiki

Description

The Source Length runs down the X-Axis of the light, and can be rotated by rotating the light. When rotating the light the Source Length will continue along the Local Space X-Axis, but when checking the World Space, the light may not follow a direct axis.

Syntax

lr.SetSourceLength(lightid, lenght)

Parameters

  • lightid

    The light identifier.

  • lenght

    The lenght in number value.

Return Value

  • Returns true on success.

Exemple

lr = ImportPackage("lightstreamer")

function OnPackageStart()
	local light = lr.CreateLight("POINTLIGHT", 126016.046875, 81475.203125, 1550.0)
        lr.SetSourceLength(light, 300)
end
AddEvent("OnPackageStart", OnPackageStart)