2021-05-11 18:30:36 -07:00

2.3 KiB
Raw Permalink Blame History

Planck.js API Doc › Globals › DistanceJointOpt

Interface: DistanceJointOpt

Distance joint definition. This requires defining an anchor point on both bodies and the non-zero length of the distance joint. The definition uses local anchor points so that the initial configuration can violate the constraint slightly. This helps when saving and loading a game. Warning: Do not use a zero or short length.

Hierarchy

Index

Properties

Properties

Optional collideConnected

• collideConnected? : boolean

Inherited from JointOpt.collideConnected

Defined in src/dynamics/Joint.ts:69

Set this flag to true if the attached bodies should collide.


Optional dampingRatio

• dampingRatio? : number

Defined in src/dynamics/joint/DistanceJoint.ts:49

The damping ratio. 0 = no damping, 1 = critical damping.


Optional frequencyHz

• frequencyHz? : number

Defined in src/dynamics/joint/DistanceJoint.ts:45

The mass-spring-damper frequency in Hertz. A value of 0 disables softness.


Optional length

• length? : number

Defined in src/dynamics/joint/DistanceJoint.ts:53

Distance length.


Optional userData

• userData? : any

Inherited from JointOpt.userData

Defined in src/dynamics/Joint.ts:64

Use this to attach application specific data to your joints.