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.

LightOccluder2D

繼承: Node2D < CanvasItem < Node < Object

遮擋由 Light2D 投射的光線,投射陰影。

說明

遮擋 Light2D 投射的燈光,投射陰影。為了計算陰影,必須為 LightOccluder2D 提供 OccluderPolygon2D

教學

屬性

OccluderPolygon2D

occluder

int

occluder_light_mask

1

bool

sdf_collision

true


屬性說明

OccluderPolygon2D occluder 🔗

用於計算陰影的 OccluderPolygon2D


int occluder_light_mask = 1 🔗

  • void set_occluder_light_mask(value: int)

  • int get_occluder_light_mask()

LightOccluder2D 的遮擋器光照遮罩。LightOccluder2D 將僅從具有相同光照遮罩的 Light2D 投射陰影。


bool sdf_collision = true 🔗

  • void set_as_sdf_collision(value: bool)

  • bool is_set_as_sdf_collision()

If enabled, the occluder will be part of a real-time generated signed distance field that can be used in custom shaders.