From bfdf47f4b491faade6e7758592c41b9d0f3f21c1 Mon Sep 17 00:00:00 2001 From: hYdos Date: Wed, 26 Feb 2020 17:15:33 +1000 Subject: [PATCH 1/4] YeS (make sensitivity and inversion a variable) --- .../hydos/ginger/engine/cameras/FirstPersonCamera.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/github/hydos/ginger/engine/cameras/FirstPersonCamera.java b/src/main/java/com/github/hydos/ginger/engine/cameras/FirstPersonCamera.java index 5d61e3a..3df33c9 100644 --- a/src/main/java/com/github/hydos/ginger/engine/cameras/FirstPersonCamera.java +++ b/src/main/java/com/github/hydos/ginger/engine/cameras/FirstPersonCamera.java @@ -1,6 +1,7 @@ package com.github.hydos.ginger.engine.cameras; import com.github.hydos.ginger.engine.elements.objects.Player; +import com.github.hydos.ginger.engine.io.Window; import com.github.hydos.ginger.engine.math.vectors.Vector3f; public class FirstPersonCamera extends Camera @@ -34,7 +35,7 @@ public class FirstPersonCamera extends Camera position.y = player.getPosition().y; roll = player.getRotX(); - yaw = -player.getRotY() + 180; - pitch = player.getRotZ(); + yaw = -player.getRotY() + 180 + Window.getNormalizedMouseCoordinates().getX() * 8; + pitch = player.getRotZ() + -Window.getNormalizedMouseCoordinates().getY() * 8; } } From 379168ad9832f69db614b5fa183e24ebb2011f9e Mon Sep 17 00:00:00 2001 From: hYdos Date: Wed, 26 Feb 2020 17:18:05 +1000 Subject: [PATCH 2/4] SPEED --- src/main/java/com/github/hydos/ginger/engine/api/Ginger.java | 2 +- .../github/hydos/ginger/engine/cameras/FirstPersonCamera.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/github/hydos/ginger/engine/api/Ginger.java b/src/main/java/com/github/hydos/ginger/engine/api/Ginger.java index 1be042b..5082519 100644 --- a/src/main/java/com/github/hydos/ginger/engine/api/Ginger.java +++ b/src/main/java/com/github/hydos/ginger/engine/api/Ginger.java @@ -122,8 +122,8 @@ public class Ginger public void update(GameData data) { - data.camera.move(); Window.update(); + data.camera.move(); GingerUtils.update(); picker.update(); ParticleMaster.update(data.camera); diff --git a/src/main/java/com/github/hydos/ginger/engine/cameras/FirstPersonCamera.java b/src/main/java/com/github/hydos/ginger/engine/cameras/FirstPersonCamera.java index 3df33c9..6c5d32c 100644 --- a/src/main/java/com/github/hydos/ginger/engine/cameras/FirstPersonCamera.java +++ b/src/main/java/com/github/hydos/ginger/engine/cameras/FirstPersonCamera.java @@ -35,7 +35,7 @@ public class FirstPersonCamera extends Camera position.y = player.getPosition().y; roll = player.getRotX(); - yaw = -player.getRotY() + 180 + Window.getNormalizedMouseCoordinates().getX() * 8; - pitch = player.getRotZ() + -Window.getNormalizedMouseCoordinates().getY() * 8; + yaw = -player.getRotY() + 180 + Window.getNormalizedMouseCoordinates().getX() * 70; + pitch = player.getRotZ() + -Window.getNormalizedMouseCoordinates().getY() * 70; } } From 791620e251de8a07c6773aa7c18e60bb48fd0537 Mon Sep 17 00:00:00 2001 From: hYdos Date: Wed, 26 Feb 2020 17:30:31 +1000 Subject: [PATCH 3/4] comedy --- .classpath | 2 +- .../github/hydos/ginger/engine/cameras/FirstPersonCamera.java | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.classpath b/.classpath index 234db15..f82d26e 100644 --- a/.classpath +++ b/.classpath @@ -18,7 +18,7 @@ - + diff --git a/src/main/java/com/github/hydos/ginger/engine/cameras/FirstPersonCamera.java b/src/main/java/com/github/hydos/ginger/engine/cameras/FirstPersonCamera.java index 6c5d32c..9eb7af8 100644 --- a/src/main/java/com/github/hydos/ginger/engine/cameras/FirstPersonCamera.java +++ b/src/main/java/com/github/hydos/ginger/engine/cameras/FirstPersonCamera.java @@ -30,6 +30,9 @@ public class FirstPersonCamera extends Camera public void move() { + + var jdk = 13; + position.x = player.getPosition().x; position.z = player.getPosition().z; position.y = player.getPosition().y; From 8e32d45ad3f50db08b8e20d435ba96b48d5fa261 Mon Sep 17 00:00:00 2001 From: hYdos Date: Wed, 26 Feb 2020 17:39:56 +1000 Subject: [PATCH 4/4] NO YOU --- .../github/hydos/ginger/engine/cameras/FirstPersonCamera.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/com/github/hydos/ginger/engine/cameras/FirstPersonCamera.java b/src/main/java/com/github/hydos/ginger/engine/cameras/FirstPersonCamera.java index 9eb7af8..78e26b0 100644 --- a/src/main/java/com/github/hydos/ginger/engine/cameras/FirstPersonCamera.java +++ b/src/main/java/com/github/hydos/ginger/engine/cameras/FirstPersonCamera.java @@ -30,9 +30,7 @@ public class FirstPersonCamera extends Camera public void move() { - - var jdk = 13; - + position.x = player.getPosition().x; position.z = player.getPosition().z; position.y = player.getPosition().y;