diff --git a/src/explo_state.rs b/src/explo_state.rs index f9668c1..9962e42 100644 --- a/src/explo_state.rs +++ b/src/explo_state.rs @@ -7,10 +7,10 @@ use crate::ConstellationModel; use crate::Sky; use crate::MainGame; - use crate::spawn_cons_lines; use crate::CONS_VIEW_RADIUS; +use crate::MOUSE_SPEED; #[derive(Component)] pub struct InfoLabel; @@ -119,7 +119,7 @@ fn rotate_to_align(ray_1: Ray3d, ray_2: Ray3d) -> Quat { } let dot_product = dir_1.dot(dir_2).clamp(-1.0, 1.0); - let angle_of_rotation = dot_product.acos() * 6.0; + let angle_of_rotation = dot_product.acos() * MOUSE_SPEED; if angle_of_rotation.is_nan() || angle_of_rotation.is_infinite() { return Quat::IDENTITY; diff --git a/src/main.rs b/src/main.rs index f9c00f1..a511a57 100644 --- a/src/main.rs +++ b/src/main.rs @@ -21,6 +21,7 @@ const MAX_STAR_SIZE: f32 = 0.63; const STAR_SCALE: f32 = 0.02; const SKY_RADIUS: f32 = 4.0; const CONS_VIEW_RADIUS: f32 = 0.8; +const MOUSE_SPEED: f32 = 12.0; #[derive(Serialize, Deserialize, Debug, Clone)] struct StarData { @@ -141,7 +142,6 @@ fn main() { .add_systems(Update, explo_state::player_mouse_move.run_if(in_state(GameState::Game).or_else(in_state(GameState::Explo)))) .add_systems(Update, explo_state::rotate_camera.run_if(in_state(GameState::Game).or_else(in_state(GameState::Explo)))) .add_systems(Update, game_state::ui_buttons.run_if(in_state(GameState::Game))) - .add_systems(Update, explo_state::constellation_opacity.run_if(in_state(GameState::Game).or_else(in_state(GameState::Explo)))) .add_systems(Update, game_state::ui_labels.run_if(in_state(GameState::Game))) .add_systems(OnExit(GameState::Game), despawn_screen::) .add_systems(OnEnter(GameState::End), end_state::setup) @@ -149,6 +149,7 @@ fn main() { .add_systems(OnExit(GameState::End), despawn_screen::) .add_systems(OnEnter(GameState::Explo), explo_state::setup) .add_systems(Update, explo_state::player_interact.run_if(in_state(GameState::Explo))) + .add_systems(Update, explo_state::constellation_opacity.run_if(in_state(GameState::Explo))) .add_systems(OnExit(GameState::Explo), despawn_screen::) .run(); }