OccluderPolygon2D

Refreshing Cache...

Inherits: Resource < Reference < Object

Defines a 2D polygon for LightOccluder2D.

Description

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

Properties

boolclosedtrue
CullModecull_mode0
PoolVector2ArraypolygonPoolVector2Array(  )

Enumerations

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.

Property Descriptions

Defaulttrue
Setterset_closed(value)
Getteris_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.


Default0
Setterset_cull_mode(value)
Getterget_cull_mode()

The culling mode to use.


DefaultPoolVector2Array(  )
Setterset_polygon(value)
Getterget_polygon()

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

Note: The returned value is a copy of the underlying array, rather than a reference.

doradoro's advice! Getters and Setters will be deprecated! Avoid their use!

Disclaimer: This page has been automaticaly and directly extracted from the official Godot Docs website, the 2020-03-07 at 01:36:12. It's the English Stable version because it's what most Godot users should use. The Copyright owners are Juan Linietsky, Ariel Manzur and the Godot community. CC-BY 3.0. Thanks for your patience and generosity.