3.9 KiB
Planck.js API Doc › Globals › WeldJointDef
Interface: WeldJointDef
Weld joint definition. You need to specify local anchor points where they are attached and the relative body angle. The position of the anchor points is important for computing the reaction torque.
Hierarchy
↳ JointDef
↳ WeldJointDef
Index
Properties
- bodyA
- bodyB
- collideConnected
- dampingRatio
- frequencyHz
- localAnchorA
- localAnchorB
- referenceAngle
- userData
Properties
bodyA
• bodyA: Body
Defined in src/dynamics/Joint.ts:78
The first attached body.
bodyB
• bodyB: Body
Defined in src/dynamics/Joint.ts:82
The second attached body.
Optional collideConnected
• collideConnected? : boolean
Inherited from JointOpt.collideConnected
Overrides JointOpt.collideConnected
Defined in src/dynamics/Joint.ts:69
Set this flag to true if the attached bodies should collide.
Optional dampingRatio
• dampingRatio? : number
Inherited from WeldJointOpt.dampingRatio
Defined in src/dynamics/joint/WeldJoint.ts:58
The damping ratio. 0 = no damping, 1 = critical damping.
Optional frequencyHz
• frequencyHz? : number
Inherited from WeldJointOpt.frequencyHz
Defined in src/dynamics/joint/WeldJoint.ts:54
The mass-spring-damper frequency in Hertz. Rotation only. Disable softness with a value of 0.
localAnchorA
• localAnchorA: Vec2
Defined in src/dynamics/joint/WeldJoint.ts:73
The local anchor point relative to bodyA's origin.
localAnchorB
• localAnchorB: Vec2
Defined in src/dynamics/joint/WeldJoint.ts:77
The local anchor point relative to bodyB's origin.
Optional referenceAngle
• referenceAngle? : number
Inherited from WeldJointOpt.referenceAngle
Defined in src/dynamics/joint/WeldJoint.ts:62
The bodyB angle minus bodyA angle in the reference state (radians).
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.