From e7df73d4fc33e70756d6eb1e1750138b399d1e9e Mon Sep 17 00:00:00 2001 From: hut Date: Tue, 23 Apr 2024 17:43:44 +0200 Subject: [PATCH] more efficient(?) collider hiding --- src/commands.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/commands.rs b/src/commands.rs index 0f6ba4e..4a240f6 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -727,19 +727,10 @@ fn spawn_entities( } } - -pub fn hide_colliders( - //mut commands: Commands, - mut q_mesh: Query<(&mut Visibility, &Name), With>>, - //q_flag: Query>, -) { +pub fn hide_colliders(mut q_mesh: Query<(&mut Visibility, &Name), (Added, With>)>) { for (mut visibility, name) in &mut q_mesh { if name.as_str() == "Collider" { *visibility = Visibility::Hidden; } } - // TODO: not quite done here yet... -// for entity in &q_flag { -// commands.entity(entity).remove::(); -// } }