From 68580ce40b09208e06c5cb292c23d8709a1c09d0 Mon Sep 17 00:00:00 2001 From: Antoine Date: Fri, 28 May 2021 13:37:03 +0200 Subject: [PATCH] =?UTF-8?q?Correct=20camera:=20l'espace=20de=20jeu=20est?= =?UTF-8?q?=20compris=20entre=20les=20coordonn=C3=A9es=20-1000:1000=20et?= =?UTF-8?q?=20-1000*aspectRatio:1000*aspectRatio=20Peut-=C3=AAtre=20fix?= =?UTF-8?q?=C3=A9=20l'aspect=20ratio=20du=20jeu=20pour=20ne=20pas=20avoir?= =?UTF-8?q?=20certains=20probl=C3=A8mes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/engine/Engine.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/Engine.java b/src/engine/Engine.java index 70f2c0e..34c6f3c 100644 --- a/src/engine/Engine.java +++ b/src/engine/Engine.java @@ -38,7 +38,7 @@ public class Engine { this.objectsGl = new ArrayList<>(); this.width = width; this.height = height; - ObjectGl.projection = Matrix4f.orthographic(-width, width, -width * aspectRatio, width * aspectRatio, 0.1f, 100.0f); + ObjectGl.projection = Matrix4f.orthographic(-1000, 1000, -1000 * aspectRatio, 1000 * aspectRatio, 0.1f, 100.0f); ObjectGl.view = Matrix4f.translate(new Vector3f(0.0f,0.0f,1.0f)); }