Skip to content
Snippets Groups Projects
Verified Commit 1c54fe17 authored by Tobias Frisch's avatar Tobias Frisch
Browse files

[#106] Gamepad sensivity fixed again

parent 2ccb059f
No related branches found
No related tags found
1 merge request!89Resolve "Indirect Dispatch"
Pipeline #26744 passed
...@@ -127,7 +127,7 @@ namespace vkcv::camera { ...@@ -127,7 +127,7 @@ namespace vkcv::camera {
GLFWgamepadstate gamepadState; GLFWgamepadstate gamepadState;
glfwGetGamepadState(gamepadIndex, &gamepadState); glfwGetGamepadState(gamepadIndex, &gamepadState);
float sensitivity = 100.0f; float sensitivity = 1.0f;
double threshold = 0.1; double threshold = 0.1;
// handle rotations // handle rotations
......
...@@ -86,7 +86,7 @@ namespace vkcv::camera { ...@@ -86,7 +86,7 @@ namespace vkcv::camera {
GLFWgamepadstate gamepadState; GLFWgamepadstate gamepadState;
glfwGetGamepadState(gamepadIndex, &gamepadState); glfwGetGamepadState(gamepadIndex, &gamepadState);
float sensitivity = 100.0f; float sensitivity = 1.0f;
double threshold = 0.1; double threshold = 0.1;
// handle rotations // handle rotations
......
...@@ -106,7 +106,7 @@ void App::run() { ...@@ -106,7 +106,7 @@ void App::run() {
eDebugView debugView = eDebugView::None; eDebugView debugView = eDebugView::None;
eMotionBlurInput motionBlurInput = eMotionBlurInput::MotionVectorMaxTileNeighbourhood; eMotionBlurInput motionBlurInput = eMotionBlurInput::MotionVectorMaxTileNeighbourhood;
float objectVerticalSpeed = 0.005; float objectVerticalSpeed = 5;
float motionBlurMinVelocity = 0.001; float motionBlurMinVelocity = 0.001;
int cameraShutterSpeedInverse = 30; int cameraShutterSpeedInverse = 30;
float motionVectorVisualisationRange = 0.008; float motionVectorVisualisationRange = 0.008;
...@@ -139,7 +139,7 @@ void App::run() { ...@@ -139,7 +139,7 @@ void App::run() {
const glm::mat4 viewProjection = m_cameraManager.getActiveCamera().getMVP(); const glm::mat4 viewProjection = m_cameraManager.getActiveCamera().getMVP();
const auto time = frameEndTime - appStartTime; 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 float currentHeight = glm::sin(fCurrentTime * objectVerticalSpeed);
const glm::mat4 modelMatrix = glm::translate(glm::mat4(1), glm::vec3(0, currentHeight, 0)); const glm::mat4 modelMatrix = glm::translate(glm::mat4(1), glm::vec3(0, currentHeight, 0));
const glm::mat4 mvp = viewProjection * modelMatrix; const glm::mat4 mvp = viewProjection * modelMatrix;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment