Scripting API
Scripting API
PolygonCollider2D
Struct in Abyss.Physics2D, from Abyss.Physics2D.
A shape of up to 64 corners an entity meets things with, in order round it, concave or convex: cut into the convex pieces of eight corners at most Box2D's polygons are, its hollows left out. One whose sides cross is its corners' hull; fewer than three, or three in a line, meet nothing.
public struct PolygonCollider2DFields
Points
public FixedList64<Vector2> PointsIts corners, in order round it, in the entity's own units.
Offset
public Vector2 OffsetWhere its points are from, from the entity's middle.
EdgeRadius
public float EdgeRadiusHow round its corners are: the shape 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.
