Skip to content

Commit

Permalink
Fixes for demo_bevy and demo_chat
Browse files Browse the repository at this point in the history
  • Loading branch information
redjack96 committed Nov 30, 2024
1 parent 161d4e5 commit e64aff6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions demo_bevy/src/bin/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use demo_bevy::{
connection_config, setup_level, ClientChannel, NetworkedEntities, PlayerCommand, PlayerInput, ServerChannel, ServerMessages,
};
use renet_visualizer::{RenetClientVisualizer, RenetVisualizerStyle};
use smooth_bevy_cameras::{LookTransform, LookTransformBundle, LookTransformPlugin, Smoother};
// use smooth_bevy_cameras::{LookTransform, LookTransformBundle, LookTransformPlugin, Smoother};

#[derive(Component)]
struct ControlledPlayer;
Expand Down Expand Up @@ -122,7 +122,7 @@ fn main() {
let mut app = App::new();
app.add_plugins(DefaultPlugins);
app.add_plugins(RenetClientPlugin);
app.add_plugins(LookTransformPlugin);
// app.add_plugins(LookTransformPlugin);
app.add_plugins(FrameTimeDiagnosticsPlugin);
app.add_plugins(LogDiagnosticsPlugin::default());
app.add_plugins(EguiPlugin);
Expand All @@ -139,7 +139,7 @@ fn main() {
app.insert_resource(PlayerInput::default());
app.insert_resource(NetworkMapping::default());

app.add_systems(Update, (player_input, camera_follow, update_target_system));
app.add_systems(Update, (player_input, /*camera_follow,*/ update_target_system));
app.add_systems(
Update,
(client_send_input, client_send_player_commands, client_sync_players).in_set(Connected),
Expand Down Expand Up @@ -322,7 +322,7 @@ fn setup_target(mut commands: Commands, mut meshes: ResMut<Assets<Mesh>>, mut ma
.insert(Target);
}

fn camera_follow(
/*fn camera_follow(
mut camera_query: Query<&mut LookTransform, (With<Camera>, Without<ControlledPlayer>)>,
player_query: Query<&Transform, With<ControlledPlayer>>,
) {
Expand All @@ -333,3 +333,4 @@ fn camera_follow(
cam_transform.target = player_transform.translation;
}
}
*/

0 comments on commit e64aff6

Please sign in to comment.