Scripting API

Scripting API

SpringJoint3D

Struct in Abyss.Physics3D, from Abyss.Physics3D.

Two bodies pulled toward SpringJoint3D.Distance apart by a spring of SpringJoint3D.Frequency and SpringJoint3D.DampingRatio: the body this is on and SpringJoint3D.ConnectedBody, or a point in the world where that is none.

public struct SpringJoint3D

Remarks

A frequency of 0 is a spring as stiff as there is: a rod. Distance as DistanceJoint3D's; 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 spring pulls the anchors, in meters.

DampingRatio

public float DampingRatio

How the spring is slowed: 0 not at all, 1 at once.

Frequency

public float Frequency

How stiff the spring is, in times a second it bounces; 0 as stiff as there is.

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.