fix selectagon's spontaneous rotation

This commit is contained in:
yuni 2024-04-24 21:20:28 +02:00
parent 2b07ef67d1
commit 1cf4d28609

View file

@ -714,7 +714,7 @@ fn update_target_selectagon(
} }
selectagon_trans.translation = target_trans.translation; selectagon_trans.translation = target_trans.translation;
selectagon_trans.scale = target_trans.scale; selectagon_trans.scale = target_trans.scale;
selectagon_trans.look_at(camera_trans.translation, Vec3::X); selectagon_trans.look_at(camera_trans.translation, target_trans.up().into());
// Enlarge Selectagon to a minimum angular diameter // Enlarge Selectagon to a minimum angular diameter
let (angular_diameter, _, _) = camera::calc_angular_diameter( let (angular_diameter, _, _) = camera::calc_angular_diameter(