ColliderDescription2D#
What an object physically occupies, for collision — described by the project the same way RenderDescription2D describes what it looks like, and for the same reason: it's a small, cheap-to-author shape fact, not substantial enough content to earn its own reusable datablock the way a whole Object does. Box, circle and arc identify query geometry; legacy overlap queries still use axis-aligned bounds, not a general physics solver. Omitted Width/Height default to the object's own transform scale — the common case (hitbox matches the visual) costs zero extra authored data.
public sealed record ColliderDescription2D(string Shape, float? Width, float? Height)Record properties#
| Property | Type | Access | Constructor default |
|---|---|---|---|
Shape | string | get; init; | required |
Width | float? | get; init; | required |
Height | float? | get; init; | required |
Members: IsSensor · Layer · Mask
IsSensor#
public bool IsSensor { get; init; }Layer#
public int Layer { get; init; }Initial value: 1
Mask#
public int Mask { get; init; }Initial value: -1
Source#
- RuntimeWorld.cs