Debug scanner uses shape_intersections

That was really easy. I feel dumb for making a checkpoint commit before.
Oh well, onwards to the next step: Swap over the flocking systems.
This commit is contained in:
2025-12-24 15:01:03 -06:00
parent 119d7acf09
commit 5f0b428811

View File

@@ -117,17 +117,13 @@ fn do_scan(
match select_mode { match select_mode {
SelectionMode::NearestSingle => todo!(), SelectionMode::NearestSingle => todo!(),
SelectionMode::CircularArea => { SelectionMode::CircularArea => {
let boids = spatial.shape_hits( let boids = spatial.shape_intersections(
&Collider::circle(SCANRADIUS), &Collider::circle(SCANRADIUS),
cursor_pos.translation.xy(), cursor_pos.translation.xy(),
0.0, 0.0,
Dir2::Y,
64,
&ShapeCastConfig::from_max_distance(100.0),
&SpatialQueryFilter::default() &SpatialQueryFilter::default()
).into_iter() ).into_iter()
.map(|shape_hit| { .map(|entt| {
let entt = shape_hit.entity;
let (tsfm, vel, _) = boids_query let (tsfm, vel, _) = boids_query
.get(entt) .get(entt)
.expect("Debugger scanned a Boid missing one of it's components!"); .expect("Debugger scanned a Boid missing one of it's components!");