(c2a796af9) Fixed: globalZoomScale not working properly past fullHD resolutions

This commit is contained in:
Joonas Rikkonen
2019-05-16 06:23:30 +03:00
parent 2aaf5c359f
commit 71c59e98a7
12 changed files with 331 additions and 142 deletions
+1 -1
View File
@@ -184,7 +184,7 @@ namespace Barotrauma
worldView = new Rectangle(0, 0, GameMain.GraphicsWidth, GameMain.GraphicsHeight);
viewMatrix = Matrix.CreateTranslation(new Vector3(GameMain.GraphicsWidth / 2.0f, GameMain.GraphicsHeight / 2.0f, 0));
globalZoomScale = new Vector2(resolution.X, resolution.Y).Length() / new Vector2(1920, 1080).Length();
globalZoomScale = (float)Math.Pow(new Vector2(resolution.X, resolution.Y).Length() / new Vector2(1920, 1080).Length(), 2);
}
public void UpdateTransform(bool interpolate = true)