diff --git a/examples/replication_groups/client.rs b/examples/replication_groups/client.rs index 7a6ff17fc..709d333ec 100644 --- a/examples/replication_groups/client.rs +++ b/examples/replication_groups/client.rs @@ -278,7 +278,7 @@ pub(crate) fn interpolate( assert_eq!(tail_status.current, parent_status.current); *tail = tail_start_value.clone(); *parent_position = pos_start.clone(); - info!( + debug!( ?tail, ?parent_position, "after interpolation; CURRENT = START" @@ -296,7 +296,7 @@ pub(crate) fn interpolate( assert_eq!(tail_status.current, parent_status.current); *tail = tail_end_value.clone(); *parent_position = pos_end.clone(); - info!( + debug!( ?tail, ?parent_position, "after interpolation; CURRENT = END" @@ -324,13 +324,13 @@ pub(crate) fn interpolate( != tail_start_value.0.front().unwrap().0 { tail.0.push_front(tail_end_value.0.front().unwrap().clone()); - info!("ADD POINT"); + debug!("ADD POINT"); } // the path is straight! just move the head and adjust the tail *parent_position = PlayerPosition::lerp(pos_start.clone(), pos_end.clone(), t); tail.shorten_back(parent_position.0, tail_length.0); - info!( + debug!( ?tail, ?parent_position, "after interpolation; FIRST SEGMENT" @@ -371,7 +371,7 @@ pub(crate) fn interpolate( // now move the head by `pos_distance_to_do` while remaining on the tail path for i in (0..segment_idx).rev() { let dist = segment_length(parent_position.0, tail_end_value.0[i].0); - info!( + debug!( ?i, ?dist, ?pos_distance_to_do, @@ -380,7 +380,7 @@ pub(crate) fn interpolate( "in other segments" ); if pos_distance_to_do < 1000.0 * f32::EPSILON { - info!(?tail, ?parent_position, "after interpolation; ON POINT"); + debug!(?tail, ?parent_position, "after interpolation; ON POINT"); // no need to change anything continue 'outer; } @@ -406,7 +406,7 @@ pub(crate) fn interpolate( .1 .get_tail(tail_end_value.0[i].0, dist - pos_distance_to_do); tail.shorten_back(parent_position.0, tail_length.0); - info!(?tail, ?parent_position, "after interpolation; ELSE"); + debug!(?tail, ?parent_position, "after interpolation; ELSE"); continue 'outer; } } @@ -419,7 +419,7 @@ pub(crate) fn interpolate( .1 .get_tail(pos_end.0, dist - pos_distance_to_do); tail.shorten_back(parent_position.0, tail_length.0); - info!(?tail, ?parent_position, "after interpolation; ELSE FIRST"); + debug!(?tail, ?parent_position, "after interpolation; ELSE FIRST"); } } } diff --git a/examples/replication_groups/shared.rs b/examples/replication_groups/shared.rs index 9eb08ab02..5273a3e2d 100644 --- a/examples/replication_groups/shared.rs +++ b/examples/replication_groups/shared.rs @@ -28,14 +28,10 @@ pub struct SharedPlugin; impl Plugin for SharedPlugin { fn build(&self, app: &mut App) { - app.add_plugins(WorldInspectorPlugin::new()); app.add_systems(Update, draw_snakes); } } -// head -// snake - // This system defines how we update the player's positions when we receive an input pub(crate) fn shared_movement_behaviour(position: &mut PlayerPosition, input: &Inputs) { const MOVE_SPEED: f32 = 10.0; @@ -121,13 +117,13 @@ pub(crate) fn draw_snakes( if position.0.x != points.0.front().unwrap().0.x && position.0.y != points.0.front().unwrap().0.y { - info!("DIAGONAL"); + debug!("DIAGONAL"); } // draw the rest of the lines for (start, end) in points.0.iter().zip(points.0.iter().skip(1)) { gizmos.line_2d(start.0, end.0, color.0); if start.0.x != end.0.x && start.0.y != end.0.y { - info!("DIAGONAL"); + debug!("DIAGONAL"); } } }