From d01990e3bb77bd7ee6158912f5883a2c2961f3f1 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Tue, 21 Nov 2023 12:34:06 +0100 Subject: [PATCH] Fix deadlock in editor when using snap to the group with actor that has empty bounds #1971 --- Source/Editor/Gizmo/TransformGizmo.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Editor/Gizmo/TransformGizmo.cs b/Source/Editor/Gizmo/TransformGizmo.cs index ef7558b8d..4a3fa39ba 100644 --- a/Source/Editor/Gizmo/TransformGizmo.cs +++ b/Source/Editor/Gizmo/TransformGizmo.cs @@ -111,7 +111,8 @@ namespace FlaxEditor.Gizmo if (isSelected) { GetSelectedObjectsBounds(out var selectionBounds, out _); - ray.Position = ray.GetPoint(selectionBounds.Size.Y * 0.5f); + var offset = Mathf.Max(selectionBounds.Size.Y * 0.5f, 1.0f); + ray.Position = ray.GetPoint(offset); continue; }