fix collider hiding
This commit is contained in:
parent
f56521e49f
commit
8afd150223
|
@ -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>();
|
||||
// }
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue