Ara
Download

Search or run a command

Jump to a section or open an Ara link.

Struct · Ara

Collider2d

Collision geometry, material, layer and trigger settings for a RigidBody2d.

public struct Collider2d : IComponent<Collider2d>

Properties

TypeIndex

public static uint TypeIndex { get; }

Stable engine component index.

Fields

Kind

public ColliderKind2d Kind;

Primitive type or convex polygon.

Default: "box".

HalfExtents

public Vector2 HalfExtents;

Box half extents; scale must be baked before physics extraction.

Unit: m. Range: [0.0001, ∞]. Default: [0.5,0.5].

Radius

public float Radius;

Circle or capsule radius.

Unit: m. Range: [0.0001, ∞]. Default: 0.5.

HalfHeight

public float HalfHeight;

Capsule segment half height, excluding the end caps.

Unit: m. Range: [0, ∞]. Default: 0.5.

Points

public Vector2[] Points;

Local convex hull input for polygons, in metres.

Default: [].

Layer

public uint Layer;

Zero selects static/moving defaults from the body; 1..15 select an explicit group.

Range: [0, 15]. Default: 0.

Sensor

public bool Sensor;

Report overlaps without a collision response.

Default: false.

Friction

public float Friction;

Coulomb friction coefficient.

Range: [0, ∞]. Default: 0.6.

Restitution

public float Restitution;

Elasticity: zero is inelastic, one is perfectly elastic.

Range: [0, 1]. Default: 0.

Methods

Access

public static ref Collider2d Access(Entity entity, bool write);

No description yet.

Insert

public static void Insert(in Commands commands, Entity entity, in Collider2d value);

No description yet.

Contains

public static bool Contains(Entity entity);

No description yet.