easier targeting of small objects

This commit is contained in:
yuni 2024-04-24 20:40:40 +02:00
parent e3de0d56f7
commit d1dc3da34f

View file

@ -622,7 +622,7 @@ pub fn find_closest_target<TargetSpecifier>(
// not on the player mesh but on the camera, which doesn't have a position.
let (angular_diameter, angle, distance) = calc_angular_diameter_known_target_vector(
trans, camera_transform, &target_vector);
if angle <= angular_diameter.clamp(0.001, PI) {
if angle <= angular_diameter.clamp(0.01, PI) {
// It's in the field of view!
//commands.entity(entity).insert(IsTargeted);
let distance_to_surface = distance - trans.scale.x;