WeldJointDef

data class WeldJointDef(val bodyA: Body, val bodyB: Body, val localAnchorA: Vec2 = Vec2.Zero, val localAnchorB: Vec2 = Vec2.Zero, val referenceAngle: Float = 0.0f, val linearHertz: Float = 0.0f, val angularHertz: Float = 0.0f, val linearDampingRatio: Float = 0.0f, val angularDampingRatio: Float = 0.0f, val collideConnected: Boolean = false)

Weld joint definition.

A weld joint connects two bodies together rigidly, constraining both relative translation and rotation. This constraint provides springs to mimic soft-body simulation. May be useful for breakable structures where you want to break a connection once the force is too great.

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, linearHertz: Float = 0.0f, angularHertz: Float = 0.0f, linearDampingRatio: Float = 0.0f, angularDampingRatio: Float = 0.0f, collideConnected: Boolean = false)

Properties

Link copied to clipboard

Angular damping ratio, non-dimensional. Use 1 for critical damping.

Link copied to clipboard

Angular stiffness expressed as Hertz (cycles per second). Use zero for maximum stiffness.

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

Linear damping ratio, non-dimensional. Use 1 for critical damping.

Link copied to clipboard

Linear stiffness expressed as Hertz (cycles per second). Use zero for maximum stiffness.

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

The bodyB angle minus bodyA angle in the reference state (radians)