Scripting API

Scripting API

DistanceJoint3D

Struct in Abyss.Physics3D, from Abyss.Physics3D.

Two bodies kept DistanceJoint3D.Distance apart, as a rod between them, or with DistanceJoint3D.MaxDistanceOnly no further, as a rope: the body this is on and DistanceJoint3D.ConnectedBody, or a point in the world where that is none.

public struct DistanceJoint3D

Remarks

With DistanceJoint3D.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 FixedJoint3D's.

Fields

ConnectedBody

public EntityRef ConnectedBody

The other body: an entity with a Rigidbody 3D, or under one; none for a point in the world.

EnableCollision

public bool EnableCollision

Whether the two bodies still meet each other.

AutoConfigureConnectedAnchor

public bool AutoConfigureConnectedAnchor

Whether the connected anchor is made where the anchor is as the joint is made.

Anchor

public Vector3 Anchor

Where it holds this body, in its entity's own units.

ConnectedAnchor

public Vector3 ConnectedAnchor

Where it holds the other, in its entity's own units, or in the world's where there is none.

AutoConfigureDistance

public bool AutoConfigureDistance

Whether the distance is how far apart the anchors are as the joint is made.

Distance

public float Distance

How far apart the anchors are kept, in meters.

MaxDistanceOnly

public bool MaxDistanceOnly

Whether the bodies may come nearer than DistanceJoint3D.Distance, as on a rope, and only go no further.

BreakForce

public float BreakForce

The force it breaks at, in newtons; infinity never.

BreakTorque

public float BreakTorque

The torque it breaks at, in newton meters; infinity never.