brokenJointAt

Returns the joint at index of those that broke in the last step. It has been removed, so its slot may be handed out again.

Throws

if index is not in 0 until brokenJointCount.

Samples

val world = PhysicsWorld()
val sign = world.rigidBody(Shape.box(20f, 20f), x = 0f, y = 10f, density = 10f)
// A weak weld to the world: the sign's weight breaks it at once.
val nail = world.joints.weld(sign, JointEnd.WORLD, x = 0f, y = 0f, breakForce = 1f)
world.step(1.seconds / 60)
assertPrints(world.events.brokenJointCount, "1")
assertPrints(world.events.brokenJointAt(0) == nail, "true")