diff --git a/grafika_projekt/src/main.cpp b/grafika_projekt/src/main.cpp index f658fa0..db726e0 100644 --- a/grafika_projekt/src/main.cpp +++ b/grafika_projekt/src/main.cpp @@ -39,6 +39,7 @@ std::string skyboxTextures[6] = { }; float skyboxVerticeParameter = 20.0f; +float skyboxBoundary = 19.5f; float skyboxVertices[] = { -skyboxVerticeParameter, skyboxVerticeParameter, -skyboxVerticeParameter, @@ -86,8 +87,8 @@ float skyboxVertices[] = { bool isInBoundaries(glm::vec3 nextPosition) { - float boundary = 19.5f; - return nextPosition.z > -boundary && nextPosition.z < boundary && nextPosition.y > -boundary && nextPosition.y < boundary && nextPosition.x < boundary && nextPosition.x > -boundary; + return nextPosition.z > -skyboxBoundary && nextPosition.z < skyboxBoundary && nextPosition.y > -skyboxBoundary && + nextPosition.y < skyboxBoundary && nextPosition.x < skyboxBoundary && nextPosition.x > -skyboxBoundary; }