cleaning code

This commit is contained in:
Matraf 2022-02-11 13:31:16 +01:00
parent 1e18534773
commit 677e0a1a24

View File

@ -23,7 +23,7 @@ glm::vec4 particlePosW;
glm::vec4 particlePosS; glm::vec4 particlePosS;
Core::Engine engine; Core::Engine engine;
float skyboxBoundary = 500.f;//198.0f; float skyboxBoundary = 198.f;
float old_x, old_y = -1; float old_x, old_y = -1;
glm::vec3 cursorDiff; glm::vec3 cursorDiff;
@ -96,10 +96,10 @@ void mouse(int x, int y)
old_x = x; old_x = x;
old_y = y; 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 if (x < 100 || x > 800 - 100) {
old_x = 800 / 2; //centers the last known position, this way there isn't an odd jump with your cam as it resets old_x = 800 / 2;
old_y = 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) { else if (y < 100 || y > 800 - 100) {
old_x = 800 / 2; old_x = 800 / 2;