raycast method

void raycast(
  1. RayCastCallback callback,
  2. Vector2 point1,
  3. Vector2 point2

Ray-cast the world for all fixtures in the path of the ray. Your callback controls whether you get the closest point, any point, or n-points. The ray-cast ignores shapes that contain the starting point.

point1 is the ray's starting point point2 is the ray's ending point


void raycast(RayCastCallback callback, Vector2 point1, Vector2 point2) {
  _raycastWrapper.broadPhase = contactManager.broadPhase;
  _raycastWrapper.callback = callback;
  _input.maxFraction = 1.0;
  contactManager.broadPhase.raycast(_raycastWrapper, _input);