PrismaticJoint class

A prismatic joint. This joint provides one degree of freedom: translation along an axis fixed in bodyA. Relative rotation is prevented. You can use a joint limit to restrict the range of motion and a joint motor to drive the motion or to model joint friction.



anchorA Vector2
Get the anchor point on bodyA in world coordinates.
no setterinherited
anchorB Vector2
Get the anchor point on bodyB in world coordinates.
no setterinherited
bodyA Body
getter/setter pairinherited
bodyB Body
getter/setter pairinherited
collideConnected bool
Get collide connected. Note: modifying the collide connect flag won't work correctly because the flag is only checked when fixture AABBs begin to overlap.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
isActive bool
Short-cut function to determine if either body is inactive.
no setterinherited
islandFlag bool
getter/setter pairinherited
localAnchorA Vector2
localAnchorB Vector2
localXAxisA Vector2
maxMotorForce double
Set the maximum motor force, usually in N.
getter/setter pair
motorSpeed double
Get the motor speed, usually in meters per second.
getter/setter pair
referenceAngle double
no setter
renderColor Color3i
Color used to render.
runtimeType Type
A representation of the runtime type of the object.
no setterinherited


containsBody(Body body) bool
Whether the body is connected to the joint
destructor() → void
Override to handle destruction of joint
enableLimit(bool flag) → void
Enable/disable the joint limit.
enableMotor(bool flag) → void
Enable/disable the joint motor.
getJointSpeed() double
Get the current joint translation, usually in meters.
getJointTranslation() double
getLocalAxisA() Vector2
getLowerLimit() double
Get the lower joint limit, usually in meters.
getMotorForce(double invDt) double
Get the current motor force, usually in N.
getReferenceAngle() double
getUpperLimit() double
Get the upper joint limit, usually in meters.
initVelocityConstraints(SolverData data) → void
isLimitEnabled() bool
Is the joint limit enabled?
isMotorEnabled() bool
Whether the joint motor is enabled.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
otherBody(Body body) Body
Get the other body than the argument in the joint
reactionForce(double invDt) Vector2
Get the reaction force on body2 at the joint anchor in Newtons.
reactionTorque(double invDt) double
Get the reaction torque on body2 in N*m.
render(DebugDraw debugDraw) → void
setLimits(double lower, double upper) → void
Set the joint limits, usually in meters.
solvePositionConstraints(SolverData data) bool
This returns true if the position errors are within tolerance. Internal.
solveVelocityConstraints(SolverData data) → void
toString() String
A string representation of this object.


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