Appearance
Interface: RevoluteJointDef
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.
Extends
Properties
bodyA
bodyA:
Body
The first attached body.
Inherited from
bodyB
bodyB:
Body
The second attached body.
Inherited from
collideConnected?
optionalcollideConnected:boolean
Set this flag to true if the attached bodies should collide.
Inherited from
enableLimit?
optionalenableLimit:boolean
A flag to enable joint limits.
Inherited from
enableMotor?
optionalenableMotor:boolean
A flag to enable the joint motor.
Inherited from
localAnchorA
localAnchorA:
Vec2Value
The local anchor point relative to bodyA's origin.
localAnchorB
localAnchorB:
Vec2Value
The local anchor point relative to bodyB's origin.
lowerAngle?
optionallowerAngle:number
The lower angle for the joint limit (radians).
Inherited from
maxMotorTorque?
optionalmaxMotorTorque:number
The maximum motor torque used to achieve the desired motor speed. Usually in N-m.
Inherited from
RevoluteJointOpt.maxMotorTorque
motorSpeed?
optionalmotorSpeed:number
The desired motor speed. Usually in radians per second.
Inherited from
referenceAngle?
optionalreferenceAngle:number
The bodyB angle minus bodyA angle in the reference state (radians).
style?
optionalstyle:Style
Styling for dev-tools.
Inherited from
upperAngle?
optionalupperAngle:number
The upper angle for the joint limit (radians).
Inherited from
userData?
optionaluserData:any
Use this to attach application specific data to your joints.