diff --git a/src/main.rs b/src/main.rs index 4ac86a0..61fb427 100644 --- a/src/main.rs +++ b/src/main.rs @@ -495,12 +495,21 @@ fn player_input( fn start_menu_system( keys: Res>, - mut game_state: ResMut> + mut game_state: ResMut>, + mut player_query: Query<(&mut Player, &mut Transform)> ) { if keys.just_pressed(KeyCode::Space) { info!("start space"); game_state.set(GameState::Game); } + + + if let Ok((_player, mut transform)) = player_query.get_single_mut() { + let mut rotation = Quat::IDENTITY; + rotation *= Quat::from_rotation_y((PI / 6000.0) as f32); // Rotate by 3 degrees (PI/60 radians) + rotation *= Quat::from_rotation_x((-PI / 2000.0) as f32); // Rotate by -3 degrees + transform.rotation *= rotation; // Apply the rotation + } } fn game_buttons(