diff --git a/Source/Editor/Tools/Terrain/PaintTerrainGizmo.cs b/Source/Editor/Tools/Terrain/PaintTerrainGizmo.cs index c16bdd7e6..dd837fe00 100644 --- a/Source/Editor/Tools/Terrain/PaintTerrainGizmo.cs +++ b/Source/Editor/Tools/Terrain/PaintTerrainGizmo.cs @@ -150,6 +150,14 @@ namespace FlaxEditor.Tools.Terrain return; } + // Increase or decrease brush size with scroll + if (Input.GetKey(KeyboardKeys.Shift)) + { + var currentBrush = Mode.CurrentBrush; + currentBrush.Size += dt * currentBrush.Size * Input.Mouse.ScrollDelta * 5f; + Mode.CurrentBrush = currentBrush; + } + // Check if no terrain is selected var terrain = SelectedTerrain; if (!terrain) diff --git a/Source/Editor/Tools/Terrain/PaintTerrainGizmoMode.cs b/Source/Editor/Tools/Terrain/PaintTerrainGizmoMode.cs index 1d1bf87ca..a68b90ce8 100644 --- a/Source/Editor/Tools/Terrain/PaintTerrainGizmoMode.cs +++ b/Source/Editor/Tools/Terrain/PaintTerrainGizmoMode.cs @@ -139,9 +139,9 @@ namespace FlaxEditor.Tools.Terrain } /// - /// Gets the current brush. + /// Gets or set the current brush. /// - public Brush CurrentBrush => _brushes[(int)_brushType]; + public Brush CurrentBrush { get => _brushes[(int)_brushType]; set => _brushes[(int)_brushType] = value; } /// /// Gets the circle brush instance. diff --git a/Source/Editor/Tools/Terrain/SculptTerrainGizmo.cs b/Source/Editor/Tools/Terrain/SculptTerrainGizmo.cs index 96270a740..837c86dcb 100644 --- a/Source/Editor/Tools/Terrain/SculptTerrainGizmo.cs +++ b/Source/Editor/Tools/Terrain/SculptTerrainGizmo.cs @@ -158,6 +158,14 @@ namespace FlaxEditor.Tools.Terrain return; } + // Increase or decrease brush size with scroll + if (Input.GetKey(KeyboardKeys.Shift)) + { + var currentBrush = Mode.CurrentBrush; + currentBrush.Size += dt * currentBrush.Size * Input.Mouse.ScrollDelta * 5f; + Mode.CurrentBrush = currentBrush; + } + // Check if selected terrain was changed during painting if (terrain != _paintTerrain && IsPainting) { diff --git a/Source/Editor/Tools/Terrain/SculptTerrainGizmoMode.cs b/Source/Editor/Tools/Terrain/SculptTerrainGizmoMode.cs index 4b19cfbde..b99ac135f 100644 --- a/Source/Editor/Tools/Terrain/SculptTerrainGizmoMode.cs +++ b/Source/Editor/Tools/Terrain/SculptTerrainGizmoMode.cs @@ -158,9 +158,9 @@ namespace FlaxEditor.Tools.Terrain } /// - /// Gets the current brush. + /// Gets or set the current brush. /// - public Brush CurrentBrush => _brushes[(int)_brushType]; + public Brush CurrentBrush { get => _brushes[(int)_brushType]; set => _brushes[(int)_brushType] = value; } /// /// Gets the circle brush instance.