From 6b6c70d3499f93b843616e1baf15774494128777 Mon Sep 17 00:00:00 2001 From: Jondolf Date: Sat, 8 Jul 2023 22:24:38 +0300 Subject: [PATCH] Allow ray and shape casting for entities with colliders --- src/plugins/spatial_query/mod.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/plugins/spatial_query/mod.rs b/src/plugins/spatial_query/mod.rs index b1c474da..f975b7e1 100644 --- a/src/plugins/spatial_query/mod.rs +++ b/src/plugins/spatial_query/mod.rs @@ -336,10 +336,7 @@ fn update_shape_caster_positions( } } -fn raycast( - mut rays: Query<(&RayCaster, &mut RayHits), Without>, - spatial_query: SpatialQuery, -) { +fn raycast(mut rays: Query<(&RayCaster, &mut RayHits)>, spatial_query: SpatialQuery) { let colliders = spatial_query.get_collider_hash_map(); for (ray, mut hits) in &mut rays { if ray.enabled { @@ -348,10 +345,7 @@ fn raycast( } } -fn shapecast( - mut shape_casters: Query<(&ShapeCaster, &mut ShapeHit), Without>, - spatial_query: SpatialQuery, -) { +fn shapecast(mut shape_casters: Query<(&ShapeCaster, &mut ShapeHit)>, spatial_query: SpatialQuery) { let colliders = spatial_query.get_collider_hash_map(); for (shape_caster, mut hit) in &mut shape_casters { if shape_caster.enabled {