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

This commit is contained in:
Wojtek Figat
2023-10-12 15:26:45 +02:00

View File

@@ -1119,7 +1119,12 @@ namespace FlaxEditor.Viewport
var win = (WindowRootControl)Root;
// Get current mouse position in the view
_viewMousePos = PointFromWindow(win.MousePosition);
{
// When the window is not focused, the position in window does not return sane values
Float2 pos = PointFromWindow(win.MousePosition);
if (!float.IsInfinity(pos.LengthSquared))
_viewMousePos = pos;
}
// Update input
var window = win.Window;