PrismaticJointDef

data class PrismaticJointDef(val bodyA: Body, val bodyB: Body, val localAnchorA: Vec2 = Vec2.Zero, val localAnchorB: Vec2 = Vec2.Zero, val localAxisA: Vec2 = Vec2(1f, 0f), val referenceAngle: Float = 0.0f, val enableSpring: Boolean = false, val hertz: Float = 0.0f, val dampingRatio: Float = 0.0f, val enableLimit: Boolean = false, val lowerTranslation: Float = 0.0f, val upperTranslation: Float = 0.0f, val enableMotor: Boolean = false, val maxMotorForce: Float = 0.0f, val motorSpeed: Float = 0.0f, val targetTranslation: Float = 0.0f, val collideConnected: Boolean = false)

Prismatic joint definition.

A prismatic joint allows for relative translation of two bodies along a specified axis. A prismatic joint prevents relative rotation. Therefore, a prismatic joint has a single degree of freedom.

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

localAxisA

The local translation unit axis in bodyA

Constructors

Link copied to clipboard
constructor(bodyA: Body, bodyB: Body, localAnchorA: Vec2 = Vec2.Zero, localAnchorB: Vec2 = Vec2.Zero, localAxisA: Vec2 = Vec2(1f, 0f), referenceAngle: Float = 0.0f, enableSpring: Boolean = false, hertz: Float = 0.0f, dampingRatio: Float = 0.0f, enableLimit: Boolean = false, lowerTranslation: Float = 0.0f, upperTranslation: Float = 0.0f, enableMotor: Boolean = false, maxMotorForce: Float = 0.0f, motorSpeed: Float = 0.0f, targetTranslation: 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 the joint limit

Link copied to clipboard

Enable the joint motor

Link copied to clipboard

Enable a linear spring along the prismatic joint axis

Link copied to clipboard

The spring stiffness Hertz, cycles per second

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

The lower translation limit

Link copied to clipboard

The maximum motor force, typically in newtons

Link copied to clipboard

The desired motor speed, typically in meters per second

Link copied to clipboard

The constrained angle between the bodies: bodyB_angle - bodyA_angle

Link copied to clipboard

The target translation for the joint servo, typically in meters.

Link copied to clipboard

The upper translation limit