Scripting API
Scripting API
Physics2DPlugin
Class in Abyss.Physics2D, from Abyss.Physics2D.
Physics 2D, as a plugin: a Box2D world for the game playing, stepped on the engine's fixed clock and kept in step with the entities — each Rigidbody 2D made a body and moved, with the colliders on its entity and under it that are on no body nearer, and ground made of each collider with no Rigidbody 2D at or above it, where its GlobalTransform puts it — and drawn between steps where a body asks. What code asks of a body is Physics2D, a service of the world's.
public sealed class Physics2DPlugin : IPluginRemarks
Made afresh each time the game plays — Play in the editor, a built game starting — and its Box2D world let go of as it stops. Every system here writes Physics2DPlugin.Turn, so they run one at a time, in the order they are added: the hierarchy and the bodies, what the colliders and layers are, then the step, which runs alone, the game's fixed systems after it.
A collider under a body is placed by the Transforms between, from its own up to the body's scale, as Bevy would make its GlobalTransform but without the body's own place and turn: those change as the body moves, and a shape worked out from them would come out different in the last place each step and be made again each step.
Methods
Build
public void Build(Schedule schedule)Parameters
schedule
Started
public void Started(World world)Parameters
world
Stopping
public void Stopping(World world)Parameters
world
