SurfaceLight

非推奨を表示

*このコンテンツは、ベータ版のAI(人工知能)を使用して翻訳されており、エラーが含まれている可能性があります。このページを英語で表示するには、 こちら をクリックしてください。

SurfaceLight は、指定の Light.Color および Light.Brightness を発生させる光源で、SurfaceLight.Face から、特定の 2>Class.SurfaceLight.Range2> に到達するために、5>Class.SurfaceLight.Brightness5> と 8>Class.Light.Color8> を発生させます。

SurfaceLight が照明を提供するためには、BasePart またはAttachment (部品または付属品自体がワークスペースの子である必要があります)の直接子である必要があります。SpotLight が親になってい

For more light types, please see the もっとライトタイプを section.

参照してください

コードサンプル

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

概要

プロパティ

  • 並列読み取り

    表面光から照射される角度。

  • 並列読み取り

    サーフェスライトが起源する親の側面を設定します。

  • 並列読み取り

    イルミネーションする表面ライトの顔からの距離。

Light から継承した プロパティ
  • 並列読み取り

    エミットされた光の明るさを設定します。デフォルトは 1 です。

  • 並列読み取り

    放出された光の色。

  • 並列読み取り

    オプションを「ON」に設定すると、光はソースオブジェクトから出力されます。

  • 並列読み取り

    オプションを「ON」に設定すると、障害物によってライトがブロックされた場合、シャドウを投影します。

プロパティ

Angle

並列読み取り

表面光から照射される角度。

並列読み取り

サーフェスライトが起源する親の側面を設定します。

Range

並列読み取り

イルミネーションする表面ライトの顔からの距離。

方法

イベント