Add missing initialization value for pitch

which causes a really nasty bug
This commit is contained in:
4VRDriver
2020-09-04 18:37:52 +02:00
parent 473ba514ed
commit 0f786f0216
3 changed files with 3 additions and 3 deletions

View File

@@ -36,7 +36,7 @@ private:
glm::vec3 frontVec = glm::vec3(0.0f, 0.0f, -1.0f);
glm::vec3 upVec = glm::vec3(0.0f, 1.0f, 0.0f);
float pitch;
float pitch = 0.0f;
float yaw = -90.0f;
float speed = 2.0f;

View File

@@ -107,7 +107,7 @@ void Controller::run() {
// Update game
// ...
shaderProgram.setUniform("mix_val", (float) (sin(glfwGetTime())*sin(glfwGetTime())));
shaderProgram.setUniform("mix_val", (float) (sin(glfwGetTime()*0.25)*sin(glfwGetTime()*0.25)));
model = glm::rotate(model, (float)(this->deltaTime*0.005), glm::vec3(0.0f, 1.0f, 0.0f));
//camera->lookAtTarget(glm::vec3(0.0f, 0.0f, 0.0f));

View File

@@ -28,7 +28,7 @@ Window::Window() {
glEnable(GL_DEPTH_TEST);
// Disable mouse cursor
setGrabbedCursor(0);
setGrabbedCursor(1);
#ifdef _DEBUG
std::cout << "OpenGL version: " << glGetString(GL_VERSION) << std::endl;