RevoluteJointDef

data class RevoluteJointDef(val bodyA: Body, val bodyB: Body, val localAnchorA: Vec2 = Vec2.Zero, val localAnchorB: Vec2 = Vec2.Zero, val referenceAngle: Float = 0.0f, val enableSpring: Boolean = false, val hertz: Float = 0.0f, val dampingRatio: Float = 0.0f, val enableLimit: Boolean = false, val lowerAngle: Float = 0.0f, val upperAngle: Float = 0.0f, val enableMotor: Boolean = false, val maxMotorTorque: Float = 0.0f, val motorSpeed: Float = 0.0f, val targetAngle: Float = 0.0f, val collideConnected: Boolean = false)

Revolute joint definition.

A revolute joint forces two bodies to share a common anchor point (hinge). The relative rotation about the shared point is the joint angle. You can limit the relative rotation with a joint limit that specifies a lower and upper angle. You can use a motor to drive the relative rotation about the shared point.

Parameters

bodyA

The first attached body

bodyB

The second attached body

localAnchorA

The local anchor point relative to bodyA's origin

localAnchorB

The local anchor point relative to bodyB's origin

Constructors

Link copied to clipboard
constructor(bodyA: Body, bodyB: Body, localAnchorA: Vec2 = Vec2.Zero, localAnchorB: Vec2 = Vec2.Zero, referenceAngle: Float = 0.0f, enableSpring: Boolean = false, hertz: Float = 0.0f, dampingRatio: Float = 0.0f, enableLimit: Boolean = false, lowerAngle: Float = 0.0f, upperAngle: Float = 0.0f, enableMotor: Boolean = false, maxMotorTorque: Float = 0.0f, motorSpeed: Float = 0.0f, targetAngle: Float = 0.0f, collideConnected: Boolean = false)

Properties

Link copied to clipboard
val bodyA: Body
Link copied to clipboard
val bodyB: Body
Link copied to clipboard

Set this flag to true if the attached bodies should collide

Link copied to clipboard

The spring damping ratio, non-dimensional

Link copied to clipboard

Enable joint limits

Link copied to clipboard

Enable the joint motor

Link copied to clipboard

Enable a rotational spring on the revolute hinge axis

Link copied to clipboard

The spring stiffness Hertz, cycles per second

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The lower angle for the joint limit in radians. Minimum of -0.99*pi radians.

Link copied to clipboard

The maximum motor torque, typically in newton-meters

Link copied to clipboard

The desired motor speed in radians per second

Link copied to clipboard

The bodyB angle minus bodyA angle in the reference state (radians). This defines the zero angle for the joint limits and servo target.

Link copied to clipboard

The target angle for the joint servo in radians. The joint will try to reach this angle when the motor is enabled. This defines the zero angle for the joint limit.

Link copied to clipboard

The upper angle for the joint limit in radians. Maximum of 0.99*pi radians.