b2WheelJointDef Class
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
()
Item Index
Methods
Methods
initialize
(
Void
public
-
bodyA
-
bodyB
-
anchor
-
axis
Parameters:
-
bodyA
B2Body -
bodyB
B2Body -
anchor
B2Vec2 -
axis
B2Vec2
Returns:
Void:
Properties
dampingRatio
Float
public
Suspension damping ratio, one indicates critical damping
Default: 0.0
localAnchorA
B2Vec2
public
The local anchor point relative to bodyA's origin.
localAnchorB
B2Vec2
public
The local anchor point relative to bodyB's origin.
localAxisA
B2Vec2
public
The local translation axis in bodyA.
localAxisA
B2Vec2
public
The local translation axis in bodyA.
maxMotorTorque
Float
public
Default: 0.0
motorSpeed
Float
public
The desired motor speed in radians per second.
Default: 0.0