diff --git a/src/camera.rs b/src/camera.rs index 05a3ff9..c8100a8 100644 --- a/src/camera.rs +++ b/src/camera.rs @@ -7,9 +7,9 @@ use bevy::transform::TransformSystem; use bevy_xpbd_3d::prelude::*; use crate::{settings, audio, actor}; -pub struct CameraControllerPlugin; +pub struct CameraPlugin; -impl Plugin for CameraControllerPlugin { +impl Plugin for CameraPlugin { fn build(&self, app: &mut App) { app.add_systems(Startup, setup_camera); app.add_systems(Update, handle_input); @@ -22,7 +22,6 @@ impl Plugin for CameraControllerPlugin { app.add_systems(PostUpdate, apply_input_to_player .after(PhysicsSet::Sync) .before(TransformSystem::TransformPropagate)); - app.insert_resource(ClearColor(Color::rgb(0.0, 0.0, 0.0))); } } @@ -34,6 +33,7 @@ pub fn setup_camera( Camera3dBundle { camera: Camera { hdr: true, // HDR is required for bloom + clear_color: ClearColorConfig::Custom(Color::BLACK), ..default() }, tonemapping: Tonemapping::TonyMcMapface, diff --git a/src/main.rs b/src/main.rs index 41fabdb..6891f70 100644 --- a/src/main.rs +++ b/src/main.rs @@ -51,7 +51,7 @@ impl Plugin for OutFlyPlugin { FrameTimeDiagnosticsPlugin, world::WorldPlugin, - camera::CameraControllerPlugin, + camera::CameraPlugin, commands::CommandsPlugin, hud::HudPlugin, actor::ActorPlugin,