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

3.5 KiB
Raw Permalink Blame History

Planck.js API Doc › Globals › RevoluteJointOpt

Interface: RevoluteJointOpt

Revolute joint definition. This requires defining an anchor point where the bodies are joined. The definition uses local anchor points so that the initial configuration can violate the constraint slightly. You also need to specify the initial relative angle for joint limits. This helps when saving and loading a game.

The local anchor points are measured from the body's origin rather than the center of mass because: 1. you might not know where the center of mass will be. 2. if you add/remove shapes from a body and recompute the mass, the joints will be broken.

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 enableLimit

• enableLimit? : boolean

Defined in src/dynamics/joint/RevoluteJoint.ts:80

A flag to enable joint limits.


Optional enableMotor

• enableMotor? : boolean

Defined in src/dynamics/joint/RevoluteJoint.ts:84

A flag to enable the joint motor.


Optional lowerAngle

• lowerAngle? : number

Defined in src/dynamics/joint/RevoluteJoint.ts:63

The lower angle for the joint limit (radians).


Optional maxMotorTorque

• maxMotorTorque? : number

Defined in src/dynamics/joint/RevoluteJoint.ts:72

The maximum motor torque used to achieve the desired motor speed. Usually in N-m.


Optional motorSpeed

• motorSpeed? : number

Defined in src/dynamics/joint/RevoluteJoint.ts:76

The desired motor speed. Usually in radians per second.


Optional upperAngle

• upperAngle? : number

Defined in src/dynamics/joint/RevoluteJoint.ts:67

The upper angle for the joint limit (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.