getOtherBody method

Body getOtherBody(
  1. Body body
)

Get the other body than the argument in the contact

Implementation

Body getOtherBody(Body body) {
  assert(containsBody(body), 'Body is not in contact');
  return body == bodyA ? bodyB : bodyA;
}