PointLight

Mostrar obsoleto

*Este contenido se traduce usando la IA (Beta) y puede contener errores. Para ver esta página en inglés, haz clic en aquí.

Un PointLight es una fuente de luz que emite iluminación desde un solo punto. La luz se emite en forma de esfera según el PointLight.Range de la PointLight.

Para que un PointLight proporcione iluminación, debe ser el hijo directo de un BasePart o Attachment (la parte o el accesorio en sí mismo debe ser un descendiente del Workspace).

Si un PointLight está asociado a una parte, entonces la luz emanará de la parte. BasePart.Position . Si un PointLight está asociado a un conexión, entonces la luz emanará del conexión. Attachment.WorldPosition .

Para más tipos de luz, see la sección ver también .

Ver también

Muestras de código

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

It then creates a new point light with brightness of 1, Color3 color of {255/255, 255/255, 255/255} (white) and range of 16 studs. The point 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 point light can easily be changed by modifying the property values in the code sample below. Additionally, if you have an existing point light, you can also create a similar script that modifies that light instead of creating a new BasePart and light.

Creating a New Point Light

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

Resumen

Propiedades

  • Leer paralelo

    El tamaño de la área que iluminará el PointLight.

Propiedades heredados de Light
  • Leer paralelo

    Establece la intensidad de la luz emitida, se pregunta por defecto 1.

  • Leer paralelo

    El color de la luz emitida.

  • Leer paralelo

    Si se establece en verdad, la luz se emitirá del objeto de origen.

  • Leer paralelo

    Si se establece en verdadero, proyectará sombras si la luz está bloqueada por un obstáculo.

Propiedades

Range

Leer paralelo

El tamaño de la área que iluminará el PointLight.

Métodos

Eventos