use super::*; pub use avian3d::prelude::*; /// 3D Physics systems, resources, events, etc. pub struct Physics3dPlugin; impl Plugin for Physics3dPlugin { fn build(&self, app: &mut App) { app.add_plugins((PhysicsDebugPlugin, PhysicsPlugins::default())) .add_systems( Update, toggle_physics_debug_render.run_if(state_changed::), ); } } fn toggle_physics_debug_render( state: Res>, mut config_store: ResMut, ) { let (_, config) = config_store.config_mut::(); *config = match state.get() { // TODO: Not all, don't want to hide mesh DebuggingState::On => PhysicsGizmos::all(), DebuggingState::Off => PhysicsGizmos::none(), }; }