From 1c54fe17c803c3f06477d52efd6f38703f34f5c9 Mon Sep 17 00:00:00 2001
From: Tobias Frisch <tfrisch@uni-koblenz.de>
Date: Thu, 12 Aug 2021 16:44:53 +0200
Subject: [PATCH] [#106] Gamepad sensivity fixed again

Signed-off-by: Tobias Frisch <tfrisch@uni-koblenz.de>
---
 modules/camera/src/vkcv/camera/PilotCameraController.cpp     | 2 +-
 modules/camera/src/vkcv/camera/TrackballCameraController.cpp | 2 +-
 projects/indirect_dispatch/src/App.cpp                       | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/camera/src/vkcv/camera/PilotCameraController.cpp b/modules/camera/src/vkcv/camera/PilotCameraController.cpp
index 4af8eec9..1c7bb126 100644
--- a/modules/camera/src/vkcv/camera/PilotCameraController.cpp
+++ b/modules/camera/src/vkcv/camera/PilotCameraController.cpp
@@ -127,7 +127,7 @@ namespace vkcv::camera {
         GLFWgamepadstate gamepadState;
         glfwGetGamepadState(gamepadIndex, &gamepadState);
 
-        float sensitivity = 100.0f;
+        float sensitivity = 1.0f;
         double threshold = 0.1;
 
         // handle rotations
diff --git a/modules/camera/src/vkcv/camera/TrackballCameraController.cpp b/modules/camera/src/vkcv/camera/TrackballCameraController.cpp
index cc72e94b..8de2beb8 100644
--- a/modules/camera/src/vkcv/camera/TrackballCameraController.cpp
+++ b/modules/camera/src/vkcv/camera/TrackballCameraController.cpp
@@ -86,7 +86,7 @@ namespace vkcv::camera {
         GLFWgamepadstate gamepadState;
         glfwGetGamepadState(gamepadIndex, &gamepadState);
 
-        float sensitivity = 100.0f;
+        float sensitivity = 1.0f;
         double threshold = 0.1;
 
         // handle rotations
diff --git a/projects/indirect_dispatch/src/App.cpp b/projects/indirect_dispatch/src/App.cpp
index d3afc681..b5a02086 100644
--- a/projects/indirect_dispatch/src/App.cpp
+++ b/projects/indirect_dispatch/src/App.cpp
@@ -106,7 +106,7 @@ void App::run() {
 	eDebugView          debugView       = eDebugView::None;
 	eMotionBlurInput    motionBlurInput = eMotionBlurInput::MotionVectorMaxTileNeighbourhood;
 
-	float   objectVerticalSpeed             = 0.005;
+	float   objectVerticalSpeed             = 5;
 	float   motionBlurMinVelocity           = 0.001;
 	int     cameraShutterSpeedInverse       = 30;
 	float   motionVectorVisualisationRange  = 0.008;
@@ -139,7 +139,7 @@ void App::run() {
 		const glm::mat4 viewProjection = m_cameraManager.getActiveCamera().getMVP();
 
 		const auto      time            = frameEndTime - appStartTime;
-		const float     fCurrentTime    = std::chrono::duration_cast<std::chrono::milliseconds>(time).count();
+		const float     fCurrentTime    = std::chrono::duration_cast<std::chrono::milliseconds>(time).count() * 0.001f;
 		const float     currentHeight   = glm::sin(fCurrentTime * objectVerticalSpeed);
 		const glm::mat4 modelMatrix     = glm::translate(glm::mat4(1), glm::vec3(0, currentHeight, 0));
 		const glm::mat4 mvp             = viewProjection * modelMatrix;
-- 
GitLab