Merge branch 're-enable-scale-center' of https://github.com/Tryibion/FlaxEngine into Tryibion-re-enable-scale-center

This commit is contained in:
Wojtek Figat
2025-01-13 17:12:20 +01:00
3 changed files with 5 additions and 5 deletions

View File

@@ -169,12 +169,12 @@ namespace FlaxEditor.Gizmo
closestIntersection = intersection; closestIntersection = intersection;
} }
/*// Center // Center
if (CenterBoxRaw.Intersects(ref localRay, out intersection) && intersection < closestIntersection) if (CenterBoxRaw.Intersects(ref localRay, out intersection) && intersection > closestIntersection)
{ {
_activeAxis = Axis.Center; _activeAxis = Axis.Center;
closestIntersection = intersection; closestIntersection = intersection;
}*/ }
break; break;
} }

View File

@@ -20,7 +20,7 @@ namespace FlaxEditor.Gizmo
/// <summary> /// <summary>
/// Offset to move axis away from center /// Offset to move axis away from center
/// </summary> /// </summary>
private const float AxisOffset = 0.8f; private const float AxisOffset = 1.2f;
/// <summary> /// <summary>
/// How thick the axis should be /// How thick the axis should be

View File

@@ -501,7 +501,7 @@ namespace FlaxEditor.Gizmo
_scaleDelta = Vector3.Zero; _scaleDelta = Vector3.Zero;
if (ActiveAxis == Axis.Center) if (ActiveAxis == Axis.Center)
scaleDelta = new Vector3(scaleDelta.AvgValue); scaleDelta = new Vector3(scaleDelta.ValuesSum);
} }
// Apply transformation (but to the parents, not whole selection pool) // Apply transformation (but to the parents, not whole selection pool)