Scripting API
Scripting API
DistanceJoint2D
Struct in Abyss.Physics2D, from Abyss.Physics2D.
Two bodies kept DistanceJoint2D.Distance apart, as a rod between them, or with DistanceJoint2D.MaxDistanceOnly no further, as a rope: the body this is on and DistanceJoint2D.ConnectedBody, or a point in the world where that is none.
public struct DistanceJoint2DRemarks
With DistanceJoint2D.AutoConfigureDistance the distance is how far apart the anchors are as the joint is made, and it says what that was. Anchors and breaking as HingeJoint2D's.
Fields
ConnectedBody
public EntityRef ConnectedBodyThe other body: an entity with a Rigidbody 2D, or under one; none for a point in the world.
EnableCollision
public bool EnableCollisionWhether the two bodies still meet each other.
AutoConfigureConnectedAnchor
public bool AutoConfigureConnectedAnchorWhether the connected anchor is made where the anchor is as the joint is made.
Anchor
public Vector2 AnchorWhere it holds this body, in its entity's own units.
ConnectedAnchor
public Vector2 ConnectedAnchorWhere it holds the other, in its entity's own units, or in the world's where there is none.
AutoConfigureDistance
public bool AutoConfigureDistanceWhether the distance is how far apart the anchors are as the joint is made.
Distance
public float DistanceHow far apart the anchors are kept, in meters.
MaxDistanceOnly
public bool MaxDistanceOnlyWhether the bodies may come nearer than DistanceJoint2D.Distance, as on a rope, and only go no further.
BreakForce
public float BreakForceThe force it breaks at, in newtons; infinity never.
BreakTorque
public float BreakTorqueThe torque it breaks at, in newton meters; infinity never.
