From 7abf315ecb1feb3f13e15f9c126a3737031313a9 Mon Sep 17 00:00:00 2001 From: RomenStudnevYnov <56078121+romenjelly@users.noreply.github.com> Date: Sat, 27 Jan 2024 19:46:36 +0100 Subject: [PATCH] Added NotShadowCaster to grids --- Cargo.toml | 2 +- README.md | 2 +- src/systems.rs | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 1ff35ae..10449d5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bevy_debug_grid" description = "A bevy plugin for creating grids, for debugging purposes" -version = "0.4.0" +version = "0.4.1" repository = "https://github.com/romenjelly/bevy_debug_grid" edition = "2021" license = "MIT OR Apache-2.0" diff --git a/README.md b/README.md index 3b49db3..9012050 100644 --- a/README.md +++ b/README.md @@ -237,7 +237,7 @@ Adding a `RenderLayers` component to an entity with a `Grid` will ensure that al | Bevy Version | Plugin Version | |:------------:|:--------------:| -| `0.12` | `0.3.0-0.4.0` | +| `0.12` | `0.3.0-0.4.1` | | `0.11` | `0.2.0-0.2.1` | | `0.10` | `0.1.0-0.1.1` | diff --git a/src/systems.rs b/src/systems.rs index a5829df..20bdcfd 100644 --- a/src/systems.rs +++ b/src/systems.rs @@ -3,6 +3,7 @@ use bevy::prelude::*; use bevy::render::render_resource::PrimitiveTopology; use bevy::render::view::RenderLayers; +use bevy::pbr::NotShadowCaster; use bevy::utils::HashMap; use crate::*; @@ -83,6 +84,7 @@ pub fn main_grid_mesher_untracked( let mut commands = children.spawn(( GridChild, meshes.add(mesh), + NotShadowCaster, TransformBundle::default(), VisibilityBundle::default(), simple_materials.add(SimpleLineMaterial::new( @@ -123,6 +125,7 @@ pub fn main_grid_mesher_tracked( let mut commands = children.spawn(( GridChild, meshes.add(mesh), + NotShadowCaster, TransformBundle::default(), VisibilityBundle::default(), clipped_materials.add(ClippedLineMaterial::new( @@ -144,6 +147,7 @@ pub fn main_grid_mesher_tracked( let mut commands = children.spawn(( GridChild, meshes.add(axis_mesh), + NotShadowCaster, GlobalTransform::default(), VisibilityBundle::default(), clipped_materials.add(ClippedLineMaterial::new( @@ -198,6 +202,7 @@ pub fn sub_grid_mesher( let mut child_commands = children.spawn(( SubGridChild, meshes.add(mesh), + NotShadowCaster, TransformBundle::from_transform(Transform::from_translation( alignment.shift_vec3(-Vec3::Y * SUB_GRID_VERTICAL_OFFSET), )), @@ -253,6 +258,7 @@ pub fn grid_axis_mesher( let mut commands = children.spawn(( GridAxisChild, meshes.add(mesh), + NotShadowCaster, TransformBundle::default(), VisibilityBundle::default(), simple_materials.add(SimpleLineMaterial::new( @@ -278,6 +284,7 @@ pub fn grid_axis_mesher( let mut commands = children.spawn(( GridAxisChild, meshes.add(mesh), + NotShadowCaster, TransformBundle::default(), VisibilityBundle::default(), simple_materials.add(SimpleLineMaterial::new(