fix rotation of selectagon, especially when targeting jupiter

main
hut 2024-04-15 04:07:56 +02:00
parent 2d5348956e
commit 32537315d0
1 changed files with 1 additions and 1 deletions

View File

@ -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(