fix collider hiding

This commit is contained in:
yuni 2024-04-16 17:12:39 +02:00
parent f56521e49f
commit 8afd150223

View file

@ -618,11 +618,17 @@ fn spawn_entities(
pub fn hide_colliders(
mut q_mesh: Query<(&mut Visibility, &Name), (With<NeedsSceneColliderRemoved>, With<Handle<Mesh>>)>,
//mut commands: Commands,
mut q_mesh: Query<(&mut Visibility, &Name), With<Handle<Mesh>>>,
//q_flag: Query<Entity, With<NeedsSceneColliderRemoved>>,
) {
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::<NeedsSceneColliderRemoved>();
// }
}