b2PrismaticJointDef Class
Prismatic 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
b2PrismaticJointDef
()
Item Index
Methods
Methods
initialize
-
bodyA
-
bodyB
-
anchor
-
axis
Parameters:
-
bodyA
B2Body -
bodyB
B2Body -
anchor
B2Vec2 -
axis
B2Vec2
Returns:
Properties
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 unit axis in bodyA.
lowerTranslation
Float
public
The lower translation limit, usually in meters.
Default: 0.0
maxMotorForce
Float
public
The maximum motor torque, usually in N-m.
Default: 0.0
motorSpeed
Float
public
The desired motor speed in radians per second.
Default: 0.0
referenceAngle
Float
public
The constrained angle between the bodies: bodyB_angle - bodyA_angle.
Default: 0.0
type
Int
public
upperTranslation
Float
public
The upper translation limit, usually in meters.
Default: 0.0