raycastAny method

bool raycastAny([
  1. Vector3? from,
  2. Vector3? to,
  3. RayOptions? options,
  4. RaycastResult? result,
])

Ray cast, and stop at the first result. Note that the order is random - but the method is fast. @return True if any body was hit.

Implementation

bool raycastAny([Vector3? from, Vector3? to, RayOptions? options, RaycastResult? result]) {
  options ??= RayOptions();
  options.mode = RayMode.any;
  options.from = from;
  options.to = to;
  options.result = result;
  return _tmpRay.intersectWorld(this, options);
}