Constraint constructor

Constraint(
  1. Body bodyA,
  2. Body bodyB, {
  3. bool collideConnected = true,
  4. bool wakeUpBodies = true,
})

Implementation

Constraint(
  this.bodyA,
  this.bodyB,
  {
    this.collideConnected = true,
    bool wakeUpBodies = true
  }
) {
  id = Constraint.idCounter++;
  if (wakeUpBodies) {
    bodyA.wakeUp();
    bodyB.wakeUp();
  }
}