Skip to content

OccluderPolygon2D

Inherits: Resource < RefCounted < Object

Defines a 2D polygon for LightOccluder2D.

Editor facility that helps you draw a 2D polygon used as resource for LightOccluder2D.

Type Name Default
bool closed true
CullMode cull_mode 0
PackedVector2Array polygon PackedVector2Array()

CullMode

enum CullMode

CULL_DISABLED = 0

Culling is disabled. See cull_mode.

CULL_CLOCKWISE = 1

Culling is performed in the clockwise direction. See cull_mode.

CULL_COUNTER_CLOCKWISE = 2

Culling is performed in the counterclockwise direction. See cull_mode.

closed

bool closed = true

If true, closes the polygon. A closed OccluderPolygon2D occludes the light coming from any direction. An opened OccluderPolygon2D occludes the light only at its outline’s direction.

cull_mode

CullMode cull_mode = 0

The culling mode to use.

polygon

PackedVector2Array polygon = PackedVector2Array()

A Vector2 array with the index for polygon’s vertices positions.