From 32537315d0f478eed943c85bc409d603e9897fc5 Mon Sep 17 00:00:00 2001 From: hut Date: Mon, 15 Apr 2024 04:07:56 +0200 Subject: [PATCH] fix rotation of selectagon, especially when targeting jupiter --- src/hud.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hud.rs b/src/hud.rs index 1d46a83..fb553ee 100644 --- a/src/hud.rs +++ b/src/hud.rs @@ -598,7 +598,7 @@ fn update_target_selectagon( } selectagon_trans.translation = target_trans.translation; selectagon_trans.scale = target_trans.scale; - selectagon_trans.rotation = camera_trans.rotation; + selectagon_trans.rotation = Quat::from_rotation_arc(Vec3::Z, (-selectagon_trans.translation).normalize()); // Enlarge Selectagon to a minimum angular diameter let (angular_diameter, _, _) = camera::calc_angular_diameter(