SurfaceLight

Visualizza obsoleti

*Questo contenuto è tradotto usando AI (Beta) e potrebbe contenere errori. Per visualizzare questa pagina in inglese, clicca qui.

Un SurfaceLight è una fonte di luce che emette illuminazione di un Light.Color e Light.Brightness da un SurfaceLight.Face per un 2> Class.SurfaceLight.Range2> specificato.

Per fornire illuminazione, una SurfaceLight deve essere il figlio diretto di un BasePart o Attachment (la parte o l'accessorio stesso deve essere discendente dello Area di lavoro). Se una SurfaceLight è parented a part, la luce emanerà dalla parte selezionata del viso(s). Se parented aattachment SurfaceLight è equivalente a un

For more light types, please see the vedi anche section.

Vedi anche

Campioni di codice

This example creates a new anchored BasePart named Part at the position {0, 0, 0}.

It then creates a new surface light with brightness of 1, Color3 color of {255/255, 255/255, 255/255} (white) and range of 16 studs. The surface light's parent is set to the BasePart we created. To view the light, navigate to the part at {0, 0, 0} or move the Part created to a location visible to the player.

Please note that the properties of the created surface light can easily be changed by modifying the property values in the code sample below. Additionally, if you have an existing surface light, you can also create a similar script that modifies that surface light instead of creating a new BasePart and light.

Creating a New Surface Light

local part = Instance.new("Part")
part.Anchored = true
part.Position = Vector3.new(0, 0, 0)
part.Parent = workspace
local light = Instance.new("SurfaceLight")
light.Color = Color3.fromRGB(255, 255, 255)
light.Brightness = 1
light.Range = 16
light.Parent = part

Sommario

Proprietà

  • Lettura Parallela

    L'angolo in cui la luce viene riflessa dalla Superficie di Luce.

  • Lettura Parallela

    Imposta il lato del padre da cui viene la SurfaceLight.

  • Lettura Parallela

    La distanza dalla faccia della Luce di Superficie che si illuminerà.

Proprietà provenienti da Light
  • Lettura Parallela

    Imposta quanto sia luminosa la luce emessa, predefinita a 1.

  • Lettura Parallela

    Il colore della luce emessa.

  • Lettura Parallela

    Se impostato su true, la luce verrà emessa dall'oggetto fonte.

  • Lettura Parallela

    Se impostato su true, proietterà ombre se la luce è bloccata da un ostacolo.

Proprietà

Angle

Lettura Parallela

L'angolo in cui la luce viene riflessa dalla Superficie di Luce.

Lettura Parallela

Imposta il lato del padre da cui viene la SurfaceLight.

Range

Lettura Parallela

La distanza dalla faccia della Luce di Superficie che si illuminerà.

Metodi

Eventi