OccluderPolygon2D

Inherits: Resource < Reference < Object

Category: Core

Brief Description

Defines a 2D polygon for LightOccluder2D.

Enumerations

enum CullMode:

  • CULL_DISABLED = 0 — Culling mode for the occlusion. Disabled means no culling. See cull_mode.
  • CULL_CLOCKWISE = 1 — Culling mode for the occlusion. Sets the culling to be in clockwise direction. See cull_mode.
  • CULL_COUNTER_CLOCKWISE = 2 — Culling mode for the occlusion. Sets the culling to be in counter clockwise direction. See cull_mode.

Description

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

Property Descriptions

Setter set_closed(value)
Getter is_closed()

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. Default value true.

Setter set_cull_mode(value)
Getter get_cull_mode()

Set the direction of the occlusion culling when not CULL_DISABLED. Default value DISABLED.

Setter set_polygon(value)
Getter get_polygon()

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