raycastAll method
List<RaycastResult<ShapeHitbox> >
raycastAll(
- int numberOfRays, {
- Vector2? origin,
- double? maxDistance,
- double startAngle = 0,
- double sweepAngle = tau,
- List<
Ray2> ? rays, - List<
ShapeHitbox> ? ignoreHitboxes,
inherited
Implementation
List<RaycastResult<ShapeHitbox>> raycastAll(
int numberOfRays, {
Vector2? origin,
double? maxDistance,
double startAngle = 0,
double sweepAngle = tau,
List<Ray2>? rays,
List<ShapeHitbox>? ignoreHitboxes,
}) {
try {
return gameRef.raycastAll(
origin ?? rectCollision.center.toVector2(),
numberOfRays: numberOfRays,
maxDistance: maxDistance,
startAngle: startAngle,
sweepAngle: sweepAngle,
rays: rays,
ignoreHitboxes: [
...children.query<ShapeHitbox>(),
..._getSensorsHitbox(),
...ignoreHitboxes ?? [],
],
);
} catch (e) {
return [];
}
}