Basics
Guides
API Reference
Basics
Guides
API Reference
[18:7] extends: Joint
Wraps jbox2d's PrismaticJoint (com.almasb.fxgl.physics.box2d.dynamics.joints.PrismaticJoint). Provides one degree of freedom: translation along an axis fixed in bodyA. Relative rotation is prevented. Supports an optional joint limit to restrict the range of motion and a joint motor to drive the motion or model joint friction.
PrismaticJoint ()
Empty default constructor; populated by adopt.
adopt (object Ajo)
Wraps an existing PrismaticJoint AussomJavaObject.
getLocalAnchorA ()
Returns the local anchor on body A as a Vec2 wrapper.
getLocalAnchorB ()
Returns the local anchor on body B as a Vec2 wrapper.
getLocalAxisA ()
Returns the local translation axis in body A as a Vec2 wrapper.
getReferenceAngle ()
Returns the reference angle (radians) between the bodies.
getJointTranslation ()
Returns the current joint translation, usually in meters.
getJointSpeed ()
Returns the current joint speed.
isLimitEnabled ()
Returns whether the joint limit is enabled.
enableLimit (bool Flag)
Enables or disables the joint limit.
getLowerLimit ()
Returns the lower joint limit, usually in meters.
getUpperLimit ()
Returns the upper joint limit, usually in meters.
setLimits (double Lower, double Upper)
Sets the joint limits, usually in meters.
Lower must be less than or equal to Upper.isMotorEnabled ()
Returns whether the joint motor is enabled.
enableMotor (bool Flag)
Enables or disables the joint motor.
setMotorSpeed (double Speed)
Sets the motor speed, usually in meters per second.
getMotorSpeed ()
Returns the motor speed, usually in meters per second.
setMaxMotorForce (double Force)
Sets the maximum motor force, usually in N.
getMaxMotorForce ()
Returns the maximum motor force, usually in N.
getMotorForce (double InvDt)
Returns the current motor force for the inverse dt, usually in N.

Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.