Ship production navigation authoring workflow

This commit is contained in:
Rbanh committed 2026-07-12 02:53:43 -04:00
1 parent 0798aa5d57
commit b4aa61e394
35 files changed
+3898 -602

No files matched your search

+20 -8
View File
@@ -154,33 +154,45 @@ fn draw_navigation_visualizers(
links: Query<(&NavigationLink, &GlobalTransform), With<LevelObject>>,
) {
for (value, global) in &bounds {
let (_, rotation, center) = global.to_scale_rotation_translation();
let half_extents = crate::ui::navigation_inspector::world_aabb_half_extents(
global.affine(),
value.half_extents,
);
let center = global.translation();
draw_box(
&mut gizmos,
center,
rotation,
value.half_extents,
Quat::IDENTITY,
half_extents,
Color::srgba(0.12, 0.82, 0.78, 0.72),
);
}
for (value, global) in &obstacles {
let (_, rotation, center) = global.to_scale_rotation_translation();
let half_extents = crate::ui::navigation_inspector::world_aabb_half_extents(
global.affine(),
value.half_extents,
);
let center = global.translation();
draw_box(
&mut gizmos,
center,
rotation,
value.half_extents,
Quat::IDENTITY,
half_extents,
Color::srgba(1.0, 0.28, 0.22, 0.78),
);
}
for (value, global) in &areas {
let (_, rotation, center) = global.to_scale_rotation_translation();
let half_extents = crate::ui::navigation_inspector::world_aabb_half_extents(
global.affine(),
value.half_extents,
);
let center = global.translation();
let color = if value.walkable {
Color::srgba(0.32, 0.72, 1.0, 0.62)
} else {
Color::srgba(1.0, 0.55, 0.18, 0.72)
};
draw_box(&mut gizmos, center, rotation, value.half_extents, color);
draw_box(&mut gizmos, center, Quat::IDENTITY, half_extents, color);
}
for (value, global) in &links {
let start = global.transform_point(value.start);