API Documentation for:
Show:

b2WheelJointDef Class

Extends B2JointDef
Defined in: b2WheelJointDef:17
Module: Joints

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.

Constructor

b2WheelJointDef

()

Defined in b2WheelJointDef:17

Methods

initialize

(
  • bodyA
  • bodyB
  • anchor
  • axis
)
Void public

Defined in initialize:189

Parameters:

  • bodyA B2Body
  • bodyB B2Body
  • anchor B2Vec2
  • axis B2Vec2

Returns:

Void:

Properties

dampingRatio

Float public

Defined in dampingRatio:102

Suspension damping ratio, one indicates critical damping

Default: 0.0

enableLimit

Boolean public

Defined in enableLimit:112

Default: false

enableMotor

Boolean public

Defined in enableMotor:121

Enable/disable the joint motor.

Default: false

localAnchorA

B2Vec2 public

Defined in localAnchorA:54

The local anchor point relative to bodyA's origin.

localAnchorB

B2Vec2 public

Defined in localAnchorB:63

The local anchor point relative to bodyB's origin.

localAxisA

B2Vec2 public

Defined in localAxisA:81

The local translation axis in bodyA.

localAxisA

B2Vec2 public

Defined in localAxisA:72

The local translation axis in bodyA.

maxMotorTorque

Float public

Defined in maxMotorTorque:141

Default: 0.0

motorSpeed

Float public

Defined in motorSpeed:150

The desired motor speed in radians per second.

Default: 0.0

type

Int public

Defined in type:94

upperTranslation

Number public

Suspension frequency, zero indicates no suspension

Default: 0