Scripting API
Scripting API
Colliders2DGeometry
Class in Abyss.Physics2D, from Abyss.Physics2D.
The colliders that stand still in 2D, as convex outlines, for what is worked out of a scene in the editor by code with no physics of its own: a navmesh in 2D, its floor less what they cover. Adds itself to the world's services as the engine's IStaticGeometry2D.
public sealed class Colliders2DGeometry : IPlugin, IStaticGeometry2DRemarks
Standing still is ground — a collider with no Rigidbody 2D on its entity or above it — or a collider whose nearest Rigidbody 2D is Static. A trigger meets nothing, and is left out.
Each shape as Physics 2D makes it, where its entity's GlobalTransform puts it: a box its four corners, or eight round its rounded corners; a circle eight corners round it, its radius scaled by the larger of the entity's X and Y; a capsule four corners round each end; a polygon the convex pieces Physics 2D cuts it into; an edge each of its lines a thin strip.
Methods
Build
public void Build(Schedule schedule)Parameters
schedule
StaticOutlines
public IReadOnlyList<Vector2[]> StaticOutlines(World world, IReadOnlyCollection<ulong> entities)Parameters
worldentities
MeetsTiles
public bool MeetsTiles(World world, ulong entity)Parameters
worldentity
