raycast method
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
Implementation
void raycast(RayCastCallback callback, Vector2 point1, Vector2 point2) {
_raycastWrapper.broadPhase = contactManager.broadPhase;
_raycastWrapper.callback = callback;
_input.maxFraction = 1.0;
_input.p1.setFrom(point1);
_input.p2.setFrom(point2);
contactManager.broadPhase.raycast(_raycastWrapper, _input);
}