Initial work on rollback and refactor

This commit is contained in:
2026-08-12 12:27:35 +02:00
parent ad6c1e17ac
commit a21f24b2d9
45 changed files with 1451 additions and 717 deletions
+16
View File
@@ -0,0 +1,16 @@
use bevy::{color::palettes::css::RED, prelude::*};
use crate::stage::StageLine;
pub fn debug_draw_scene(mut gizmos: Gizmos, planes: Query<&StageLine>) {
for plane in planes {
let from = plane.segment.point1();
let to = plane.segment.point2();
let from_3d = Vec3::new(from.x, from.y, 0.0);
let end_3d = Vec3::new(to.x, to.y, 0.0);
let normal_3d = Vec3::new(plane.normal.x, plane.normal.y, 0.0);
gizmos.line(from_3d, end_3d, RED);
let midpoint = (from_3d + end_3d) * 0.5;
gizmos.arrow(midpoint, midpoint + normal_3d, RED);
}
}