RevoluteJointDef class

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:<br/>

  • you might not know where the center of mass will be.
  • if you add/remove shapes from a body and recompute the mass, the joints will be broken.




bodyA Body
The first attached body.
read / write, inherited
bodyB Body
The second attached body.
read / write, inherited
collideConnected bool
Set this flag to true if the attached bodies should collide.
read / write, inherited
enableLimit bool
A flag to enable joint limits.
read / write
enableMotor bool
A flag to enable the joint motor.
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
localAnchorA Vector2
The local anchor point relative to body1's origin.
read / write
localAnchorB Vector2
The local anchor point relative to body2's origin.
read / write
lowerAngle double
The lower angle for the joint limit (radians).
read / write
maxMotorTorque double
The maximum motor torque used to achieve the desired motor speed. Usually in N-m.
read / write
motorSpeed double
The desired motor speed. Usually in radians per second.
read / write
referenceAngle double
The body2 angle minus body1 angle in the reference state (radians).
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
type JointType
The joint type is set automatically for concrete joint types.
read / write, inherited
upperAngle double
The upper angle for the joint limit (radians).
read / write
userData Object
Use this to attach application specific data to your joints.
read / write, inherited


initialize(Body b1, Body b2, Vector2 anchor) → void
Initialize the bodies, anchors, and reference angle using the world anchor. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
toString() String
A string representation of this object. [...]


operator ==(Object other) bool
The equality operator. [...]