raycastAny method

bool raycastAny([
  1. Vec3? from,
  2. Vec3? 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([Vec3? from, Vec3? 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);
}