diff --git a/ghostland.cpp b/ghostland.cpp index 49ba48d..62f31f1 100644 --- a/ghostland.cpp +++ b/ghostland.cpp @@ -333,6 +333,8 @@ int main(int argc, char *argv[]) ghosts.push_back(new Ghost(xmin_wall, xmax_wall, zmin_wall, zmax_wall)); } + player->mouse_callback(window, WINDOWWIDTH/2, WINDOWHEIGHT/2); + while (!glfwWindowShouldClose(window)) { float current_frame = static_cast(glfwGetTime()); diff --git a/player.cpp b/player.cpp index 26736e1..f6f2024 100644 --- a/player.cpp +++ b/player.cpp @@ -6,9 +6,9 @@ Player::Player(glm::vec3 startpos, float startyaw) { position = startpos; - yaw = 45.0f + startyaw; + yaw = startyaw; - pitch = 45.0f; + pitch = 0.0f; first_mouse = false; first_frame = false; light_xpersist = 0.0f;