5.1 KiB
Planck.js API Doc › Globals › WheelJointDef
Interface: WheelJointDef
Wheel joint definition. This requires defining a line of motion using an axis and an anchor point. The definition uses local anchor points and a local axis so that the initial configuration can violate the constraint slightly. The joint translation is zero when the local anchor points coincide in world space. Using local anchors and a local axis helps when saving and loading a game.
Hierarchy
↳ JointDef
↳ WheelJointDef
Index
Properties
- bodyA
- bodyB
- collideConnected
- dampingRatio
- enableMotor
- frequencyHz
- localAnchorA
- localAnchorB
- localAxisA
- maxMotorTorque
- motorSpeed
- 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 WheelJointOpt.dampingRatio
Defined in src/dynamics/joint/WheelJoint.ts:63
Suspension damping ratio, one indicates critical damping.
Optional enableMotor
• enableMotor? : boolean
Inherited from WheelJointOpt.enableMotor
Defined in src/dynamics/joint/WheelJoint.ts:47
Enable/disable the joint motor.
Optional frequencyHz
• frequencyHz? : number
Inherited from WheelJointOpt.frequencyHz
Defined in src/dynamics/joint/WheelJoint.ts:59
Suspension frequency, zero indicates no suspension.
localAnchorA
• localAnchorA: Vec2
Defined in src/dynamics/joint/WheelJoint.ts:77
The local anchor point relative to bodyA's origin.
localAnchorB
• localAnchorB: Vec2
Defined in src/dynamics/joint/WheelJoint.ts:81
The local anchor point relative to bodyB's origin.
localAxisA
• localAxisA: Vec2
Defined in src/dynamics/joint/WheelJoint.ts:85
The local translation axis in bodyA.
Optional maxMotorTorque
• maxMotorTorque? : number
Inherited from WheelJointOpt.maxMotorTorque
Defined in src/dynamics/joint/WheelJoint.ts:51
The maximum motor torque, usually in N-m.
Optional motorSpeed
• motorSpeed? : number
Inherited from WheelJointOpt.motorSpeed
Defined in src/dynamics/joint/WheelJoint.ts:55
The desired motor speed in radians per second.
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.