enlarge selectagon to a minimum angular diameter
This commit is contained in:
parent
36eb5a000e
commit
9c5a61767a
|
@ -676,6 +676,14 @@ fn update_target_selectagon(
|
|||
selectagon_trans.translation = target_trans.translation;
|
||||
selectagon_trans.scale = target_trans.scale;
|
||||
selectagon_trans.rotation = camera_trans.rotation;
|
||||
|
||||
// Enlarge Selectagon to a minimum angular diameter
|
||||
let (angular_diameter, _, _) = camera::calc_angular_diameter(
|
||||
&selectagon_trans, camera_trans);
|
||||
let min_angular_diameter = 2.0f32.to_radians();
|
||||
if angular_diameter < min_angular_diameter {
|
||||
selectagon_trans.scale *= min_angular_diameter / angular_diameter;
|
||||
}
|
||||
}
|
||||
else {
|
||||
match *selectagon_vis {
|
||||
|
|
Loading…
Reference in a new issue