diff --git a/grafika_projekt/src/main.cpp b/grafika_projekt/src/main.cpp index 94eb4e4..9e12584 100644 --- a/grafika_projekt/src/main.cpp +++ b/grafika_projekt/src/main.cpp @@ -23,7 +23,7 @@ glm::vec4 particlePosW; glm::vec4 particlePosS; Core::Engine engine; -float skyboxBoundary = 500.f;//198.0f; +float skyboxBoundary = 198.f; float old_x, old_y = -1; glm::vec3 cursorDiff; @@ -96,10 +96,10 @@ void mouse(int x, int y) old_x = x; old_y = y; - if (x < 100 || x > 800 - 100) { //you can use values other than 100 for the screen edges if you like, kind of seems to depend on your mouse sensitivity for what ends up working best - old_x = 800 / 2; //centers the last known position, this way there isn't an odd jump with your cam as it resets + if (x < 100 || x > 800 - 100) { + old_x = 800 / 2; old_y = 800 / 2; - glutWarpPointer(800 / 2, 800 / 2); //centers the cursor + glutWarpPointer(800 / 2, 800 / 2); } else if (y < 100 || y > 800 - 100) { old_x = 800 / 2;