diff --git a/CHANGELOG.md b/CHANGELOG.md index e792df0a..c9c57d1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ pointer) pair - Changed: rapier and bevy_mod_raycast backends use the `RayMap` instead of constructing their own rays +- Fixed: rapier and bevy_mod_raycast backends use `RenderLayers::default` when a + camera is missing them # 0.17.0 diff --git a/backends/bevy_picking_rapier/src/lib.rs b/backends/bevy_picking_rapier/src/lib.rs index 2670cc10..15920016 100644 --- a/backends/bevy_picking_rapier/src/lib.rs +++ b/backends/bevy_picking_rapier/src/lib.rs @@ -93,8 +93,7 @@ pub fn update_hits( continue; } - // Cameras missing render layers intersect all layers - let cam_layers = cam_layers.copied().unwrap_or_else(RenderLayers::all); + let cam_layers = cam_layers.copied().unwrap_or_default(); let predicate = |entity| { let marker_requirement = diff --git a/backends/bevy_picking_raycast/src/lib.rs b/backends/bevy_picking_raycast/src/lib.rs index 60923626..41b8a423 100644 --- a/backends/bevy_picking_raycast/src/lib.rs +++ b/backends/bevy_picking_raycast/src/lib.rs @@ -78,8 +78,7 @@ pub fn update_hits( continue; } - // Cameras missing render layers intersect all layers - let cam_layers = cam_layers.copied().unwrap_or_else(RenderLayers::all); + let cam_layers = cam_layers.copied().unwrap_or_default(); let ray = Ray3d::from(ray); let settings = RaycastSettings {