Up to date
This page is up to date for Godot 4.2
.
If you still find outdated information, please open an issue.
OccluderPolygon2D¶
继承: Resource < RefCounted < Object
为 LightOccluder2D 定义一个 2D 多边形。
描述¶
编辑工具,帮助你绘制一个 2D 多边形用作资源 LightOccluder2D。
属性¶
|
||
|
||
|
枚举¶
enum CullMode:
CullMode CULL_DISABLED = 0
禁用剔除。见 cull_mode。
CullMode CULL_CLOCKWISE = 1
按顺时针方向进行剔除。见 cull_mode。
CullMode CULL_COUNTER_CLOCKWISE = 2
按逆时针方向进行剔除。见 cull_mode。
属性说明¶
bool closed = true
如果为 true
,封闭该多边形。一个封闭的polygon2d封闭来自任何方向的光。一个开放的OccluderPolygon2D只在其轮廓方向上遮挡光。
CullMode cull_mode = 0
要使用的剔除模式。
PackedVector2Array polygon = PackedVector2Array()
void set_polygon ( PackedVector2Array value )
PackedVector2Array get_polygon ( )
带有多边形顶点位置索引的 Vector2 数组。
注意:返回值是基础数组的副本,而不是引用。