raytrace method
Iterable<RaycastResult<ShapeHitbox> >
raytrace(
- Ray2 ray, {
- int maxDepth = 10,
- List<
ShapeHitbox> ? ignoreHitboxes,
Implementation
Iterable<RaycastResult<ShapeHitbox>> raytrace(
Ray2 ray, {
int maxDepth = 10,
List<ShapeHitbox>? ignoreHitboxes,
}) {
try {
return gameRef.raytrace(
ray,
maxDepth: maxDepth,
ignoreHitboxes: [
...children.query<ShapeHitbox>(),
..._getSensorsHitbox(),
...ignoreHitboxes ?? [],
],
);
} catch (e) {
return [];
}
}