light_2d

2D: a light in a 2D scene (lane 2d/light). kind "point" (a lantern: round, fading over radius), "spot" (a cone aimed along direction), "directional" (moon or sun over everything) or "ambient" (adds base light). Lights material_2d objects (everything with lighting_2d lit_by_default) that share its mask; with shadows, occluder_2d objects cast hard shadows. Flicker for torches. Scripts: self.setField("light_2d.intensity", 2).

In scene text

light_2d { kind "…"  color (1, 0.8, 0.6)  intensity 1 }

Add it in the Inspector (Add Component), in scene text as above, or ask your AI. Fields you leave out keep their defaults.

Fields 18

FieldTypeUnit / rangeWhat it does
kindtext—point
colorcolour (r, g, b)—The light's colour.
intensitynumber0 … 64How strong (1: the colour at full).
radiusnumberunits, 1 … 100000Point and spot: how far it reaches.
falloffnumber0.1 … 16How it fades toward the radius: 1 linear, 2 soft, 4 a tight pool.
heightnumberunits, 0 … 100000Point and spot: how high above the picture it hangs (low lights rake across normal maps).
direction(x, y, z)—Spot: where it aims (x right, y up). Directional: the direction toward the light.
elevationnumberdeg, 1 … 90Directional: degrees above the picture (90 straight on, 20 raking).
conenumberdeg, 1 … 360Spot: the cone's full angle.
softnessnumber0 … 1Spot: how soft the cone's edge is.
flickernumber0 … 1Flicker: 0 steady ... 1 wild (torches, candles).
flicker_speednumberHz, 0 … 60Flickers per second.
shadowstrue / false—Casts hard shadows from occluder_2d objects (at most lighting_2d max_shadowed on screen).
prioritynumber-1000 … 1000Over the light budget, higher priority stays.
criticaltrue / false—Never dropped by the light budget.
masknumber1 … 65535Light layers (bit mask): lights materials and is blocked by occluders sharing a bit.
offset(x, y, z)unitsWhere the light sits from the object's position (a torch's flame).
enabledtrue / false—On.
Arcwright Beta 2 (0.4.0) · generated from the engine source (25e375c86)Something wrong or missing? Tell us
Download Arcwright free