SurfaceLight
*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 SurfaceLight es una fuente de luz que emite iluminación de un Class.Light.Color específico y Class.Light.Brightness de un Class.SurfaceLight.Face para un Class.SurfaceLight.Range especificado.
Para que una Superficie de luz proporcione iluminación, debe ser el hijo directo de un BasePart o Attachment (el propio ítem o accesorio debe ser un descendiente del espacio de trabajo). Si una Superficie de luz está vinculada a un ítem, entonces la luz emanará desde la cara selecc
Para más tipos de luz, consulte 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 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.
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
Resumen
Propiedades
El ángulo en el que se proyecta la luz de la superficie.
Establece el lado del padre de donde viene la Luz de Superficie.
La distancia desde la cara de la Luz de Superficie que iluminará.
Establece la intensidad de la luz emitida, se pregunta por defecto 1.
El color de la luz emitida.
Si se establece en verdad, la luz se emitirá del objeto de origen.
Si se establece en verdadero, proyectará sombras si la luz está bloqueada por un obstáculo.