Scripting API
Scripting API
BoxCollider2D
Struct in Abyss.Physics2D, from Abyss.Physics2D.
A box an entity meets things with: on its Rigidbody2D, or the nearest one above it, or ground where there is none. The other colliders are on a body the same way. Its size and place in the entity's own units, scaled with it.
public struct BoxCollider2DFields
Size
public Vector2 SizeHow wide and high it is.
Offset
public Vector2 OffsetWhere its middle is, from the entity's.
EdgeRadius
public float EdgeRadiusHow round its corners are: the box grows by it all round.
IsTrigger
public bool IsTriggerWhether it meets nothing and is told of what enters it.
Material
public AssetRef<PhysicsMaterial2D> MaterialWhat it is made of; none for Physics 2D's settings' default.
Density
public float DensityHow heavy it is for its size, in kilograms a square meter: what its body's mass is worked out from where its Rigidbody 2D says Use Auto Mass.
