Basics
Guides
API Reference
Basics
Guides
API Reference
[17:7] extends: Joint
Wraps jbox2d's RevoluteJoint (com.almasb.fxgl.physics.box2d.dynamics.joints.RevoluteJoint). Constrains two bodies to share a common point while allowing free rotation about that point. Supports optional angular limits and a rotational motor with a maximum torque.
RevoluteJoint ()
Empty default constructor; populated by adopt.
adopt (object Ajo)
Wraps an existing RevoluteJoint 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.
getReferenceAngle ()
Returns the reference angle (radians).
getJointAngle ()
Returns the current joint angle in radians.
getJointSpeed ()
Returns the current joint angular speed in rad/sec.
isMotorEnabled ()
Returns whether the joint motor is enabled.
enableMotor (bool Flag)
Enables or disables the joint motor.
getMotorTorque (double InvDt)
Returns the current motor torque for the inverse dt.
setMotorSpeed (double Speed)
Sets the motor speed, usually in rad/sec.
setMaxMotorTorque (double Torque)
Sets the maximum motor torque, usually in N*m.
getMotorSpeed ()
Returns the motor speed, usually in rad/sec.
getMaxMotorTorque ()
Returns the maximum motor torque, usually in N*m.
isLimitEnabled ()
Returns whether the joint limit is enabled.
enableLimit (bool Flag)
Enables or disables the joint limit.
getLowerLimit ()
Returns the lower angle limit in radians.
getUpperLimit ()
Returns the upper angle limit in radians.
setLimits (double Lower, double Upper)
Sets the joint angle limits in radians.
Lower must be less than or equal to Upper.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.