Skip to content

Commit

Permalink
add line connecting squad center to leader position
Browse files Browse the repository at this point in the history
  • Loading branch information
bonsairobo committed Dec 10, 2023
1 parent 4035a0a commit 751e1e6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/squad_ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ impl SquadUi {
pub fn draw(
ui: Res<Self>,
mut gizmos: Gizmos,
mut giz_config: ResMut<GizmoConfig>,
mut egui: EguiContexts,
squad_states: Res<SquadStates>,
cameras: Query<(&Camera, &GlobalTransform)>,
Expand All @@ -34,6 +35,10 @@ impl SquadUi {
return;
};

giz_config.depth_bias = -1.0;
giz_config.line_width = 3.0;
// giz_config.line_perspective = true;

let transparent_white = Color32::from_rgba_unmultiplied(255, 255, 255, 64);
let stroke = egui::Stroke::new(3.0, transparent_white);

Expand All @@ -53,6 +58,7 @@ impl SquadUi {
}

if team.is_human() {
gizmos.line(state.center_of_mass, tfm.translation(), Color::PINK);
dbg_painter.circle(
to_egui_pos(ai_window_pos),
10.0,
Expand Down

0 comments on commit 751e1e6

Please sign in to comment.