diff --git a/src/pathfinding.rs b/src/pathfinding.rs index 3b666db..6b83047 100644 --- a/src/pathfinding.rs +++ b/src/pathfinding.rs @@ -280,6 +280,7 @@ fn negotiate_path( Option<&RotationSpeed>, )>, rapier_context: Res, + obstructions: Query<&MapObstruction>, ) { for (entity, mut actions, mut path, mut transform, collider, rotation_speed) in &mut query { let start_i32 = transform.translation.truncate().i32(); @@ -326,10 +327,11 @@ fn negotiate_path( collider, rapier_context.integration_parameters.dt, QueryFilter::new() + .predicate(&|entity| obstructions.get(entity).is_ok()) .exclude_sensors() .exclude_collider(entity), ) { - trace!("{entity:?} is stuck, hit: {hit:?}, TOI: {toi:?}"); + println!("{entity:?} is stuck, hit: {hit:?}, TOI: {toi:?}"); // TODO: Remove when we have an actual character controller. transform.translation = next.extend(0.); continue;