Scripting API
Scripting API
Joints2DEditing
Class in Abyss.Physics2D, from Abyss.Physics2D.
Joints in the editor: put on an entity, a joint brings a Rigidbody 2D where there is none on the entity or above it; Edit Joint drags its anchors in the Scene view; and the joints of what is picked are drawn there — where each holds its own body and the other, the line between, and which way a slider and a wheel's suspension move.
public sealed class Joints2DEditing : IPluginRemarks
Edit Joint puts a dot on Anchor, which moves where the joint holds its own body, and one on Connected Anchor where it is not worked out as the joint is made, which moves where it holds the other: in that body's own units, or the world's where the joint names none. Each in the entity's own units, where its GlobalTransform puts them.
Where the connected anchor is worked out, it is drawn where the anchor is, where the joint makes it.
Methods
Build
public void Build(Schedule schedule)Parameters
schedule
Fields
Blue
public static readonly Vector4 BlueWhat joints are drawn in: a light blue, #6FB8FF, apart from the colliders' green.
Constants
Button
public const string Button = "Edit Joint"What the Inspector's button reads.
