getJointTranslation method

double getJointTranslation()

Implementation

double getJointTranslation() {
  Vector2 pA = pool.popVec2(), pB = pool.popVec2(), axis = pool.popVec2();
  _bodyA.getWorldPointToOut(_localAnchorA, pA);
  _bodyB.getWorldPointToOut(_localAnchorB, pB);
  _bodyA.getWorldVectorToOutUnsafe(_localXAxisA, axis);
  pB.sub(pA);
  double translation = pB.dot(axis);
  pool.pushVec2(3);
  return translation;
}