Add viewport icons scale relative to the distance and editor control over it

#2944 #2644
This commit is contained in:
Wojtek Figat
2025-06-03 14:50:47 +02:00
parent 55b441e9fa
commit f2aaad0048
4 changed files with 43 additions and 7 deletions

View File

@@ -35,7 +35,8 @@ namespace FlaxEditor.SceneGraph
return false;
}
BoundingSphere sphere = new BoundingSphere(Transform.Translation, 7.0f);
var center = _actor.Transform.Translation;
ViewportIconsRenderer.GetBounds(ref center, ref ray.Ray.Position, out var sphere);
return CollisionsHelper.RayIntersectsSphere(ref ray.Ray, ref sphere, out distance);
}
}