Skip to content
EN

Interface: HitArea2D ​

Stored shape of the suity.hitArea2d component properties.

Properties ​

PropertyTypeDescription
shape"rect"-
xnumberLocal center X offset from the node origin.
ynumberLocal center Y offset from the node origin.
widthnumber-
heightnumber-
collisionEnabled?booleanRegisters a static collision provider when not false.
collisionLayer?stringLayer name returned by collision queries; defaults to default.
oneWay?booleanOnly blocks queries entering from above; hits report the oneWay layer.
solid?booleanWhen false, the area does not block; it can still be a tag-only or trigger region.
collisionTags?string | string[]Tags attached to collision hits; comma-separated string or an array.

Suity 开发者文档 · API 由 TypeDoc 从声明文件生成