Skip to content

Commit

Permalink
use RenderLayers::default() instead of all()
Browse files Browse the repository at this point in the history
  • Loading branch information
bonsairobo committed Dec 14, 2023
1 parent 0e2b7ce commit 4b15765
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 1 addition & 2 deletions backends/bevy_picking_rapier/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
3 changes: 1 addition & 2 deletions backends/bevy_picking_raycast/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 4b15765

Please sign in to comment.