Add ortho scale on MouseScroll.

This commit is contained in:
Jean-Baptiste Perrier
2021-02-27 20:27:06 +01:00
parent ca3948ad69
commit 3472daf97d

View File

@@ -986,6 +986,13 @@ namespace FlaxEditor.Viewport
OnMiddleMouseButtonUp();
}
if (_isOrtho)
{
var scroll = FlaxEngine.Input.MouseScrollDelta;
if (scroll != 0)
_orthoSize -= scroll * 0.2f * _orthoSize;
}
// Get clamped delta time (more stable during lags)
var dt = Math.Min(Time.UnscaledDeltaTime, 1.0f);