Table of Contents

Class PointLight2D

Positional 2D light source.

Inheritance
PointLight2D

Remarks

Casts light in a 2D environment. This light's shape is defined by a (usually grayscale) texture.

See Also

Properties

height

The height of the light. Used with 2D normal mapping. The units are in pixels, e.g. if the height is 100, then it will illuminate an object 100 pixels away at a 45° angle to the plane.

var height : float = 0.0

Property Value

float

Remarks

offset

The offset of the light's texture.

var offset : Vector2 = Vector2(0, 0)

Property Value

Vector2

Remarks

texture

Texture2D used for the light's appearance.

var texture : Texture2D

Property Value

Texture2D

Remarks

texture_scale

The texture's scale factor.

var texture_scale : float = 1.0

Property Value

float

Remarks

  • void set_texture_scale(float value)
  • float get_texture_scale