Add missing initialization value for pitch
which causes a really nasty bug
This commit is contained in:
2
Camera.h
2
Camera.h
@@ -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;
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user