Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

OccluderPolygon2D

繼承: Resource < RefCounted < Object

為 LightOccluder2D 定義一個 2D 多邊形。

說明

編輯工具,幫助你繪製一個 2D 多邊形用作資源 LightOccluder2D

屬性

bool

closed

true

CullMode

cull_mode

0

PackedVector2Array

polygon

PackedVector2Array()


列舉

enum CullMode: 🔗

CullMode CULL_DISABLED = 0

禁用剔除。見 cull_mode

CullMode CULL_CLOCKWISE = 1

按順時針方向進行剔除。見 cull_mode

CullMode CULL_COUNTER_CLOCKWISE = 2

按逆時針方向進行剔除。見 cull_mode


屬性說明

bool closed = true 🔗

  • void set_closed(value: bool)

  • bool is_closed()

如果為 true,封閉該多邊形。一個封閉的polygon2d封閉來自任何方向的光。一個開放的OccluderPolygon2D只在其輪廓方向上遮擋光。


CullMode cull_mode = 0 🔗

要使用的剔除模式。


PackedVector2Array polygon = PackedVector2Array() 🔗

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

Note: The returned array is copied and any changes to it will not update the original property value. See PackedVector2Array for more details.