Fix model highlights showing when gizmos block selection (#3508)

Co-authored-by: andy013 <10728824+andy013@users.noreply.github.com>
This commit is contained in:
sboxbot
2025-11-30 19:34:25 +00:00
committed by GitHub
parent b2b8612055
commit 3cd7bf3873

View File

@@ -637,6 +637,9 @@ public partial class SceneViewportWidget : Widget
Gizmo.Hitbox.DepthBias = 1;
Gizmo.Hitbox.TrySetHovered( tr.Distance );
if ( !Gizmo.IsHovered )
return;
if ( tr.Component is ModelRenderer mr && mr.Model is not null && !session.Selection.Contains( tr.GameObject ) )
{
Gizmo.Draw.Color = Gizmo.Colors.Active.WithAlpha( MathF.Sin( RealTime.Now * 20.0f ).Remap( -1, 1, 0.3f, 0.8f ) );