Skip to main content

SurfaceDefinition

A class in Root.Township, the global namespace.

Asset describing how embeddable items (arrows, blades) stick into a surface. Read by Embeddable when it hits a collider with this surface.

Constructors​

MemberWhat it is
SurfaceDefinition()Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets.

Fields​

2 private and internal fields
MemberWhat it is
private float embedMultiplierBacking field for EmbedMultiplier.
private bool requiresDirectionAlignmentBacking field for RequiresDirectionAlignment.

Properties​

MemberWhat it is
float EmbedMultiplier { get; }Scales how deep or easily things embed into this surface. Default 1.
bool RequiresDirectionAlignment { get; }When true, an item only embeds if it hits point first within the allowed angle. Default true.

Used in​

Members of other types that take, return or hold a SurfaceDefinition: