raycastAll method

bool raycastAll([
  1. Vec3? from,
  2. Vec3? to,
  3. RayOptions? options,
  4. RaycastCallback? callback,
])

Ray cast against all bodies. The provided callback will be executed for each hit with a RaycastResult as single argument. @return True if any body was hit.

Implementation

bool raycastAll([Vec3? from,Vec3? to, RayOptions? options, RaycastCallback? callback]) {
  options ??= RayOptions();
  options.mode = RayMode.all;
  options.from = from;
  options.to = to;
  options.callback = callback;
  return _tmpRay.intersectWorld(this, options);
}