Merge branch 'viewport_cam_drift_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-viewport_cam_drift_fix

This commit is contained in:
Wojtek Figat
2023-10-08 16:48:23 +02:00

View File

@@ -1022,7 +1022,7 @@ namespace FlaxEditor.Viewport
// Center mouse position if it's too close to the edge
var size = Size;
var center = size * 0.5f;
var center = Float2.Round(size * 0.5f);
if (Mathf.Abs(_viewMousePos.X - center.X) > center.X * 0.8f || Mathf.Abs(_viewMousePos.Y - center.Y) > center.Y * 0.8f)
{
_viewMousePos = center;