initialize method

void initialize(
  1. Body bA,
  2. Body bB
)

Implementation

void initialize(Body bA, Body bB) {
  bodyA = bA;
  bodyB = bB;
  Vector2 xB = bodyB.position;
  bodyA.getLocalPointToOut(xB, linearOffset);

  double angleA = bodyA.getAngle();
  double angleB = bodyB.getAngle();
  angularOffset = angleB - angleA;
}