]> git.localhorst.tv Git - blank.git/blobdiff - src/chunk.cpp
generate and unload chunks on player move
[blank.git] / src / chunk.cpp
index a485bfbb7d37c61eab4f80c091f1b78659c29b01..514431cbdd636209368d86127cf812d5facfcad7 100644 (file)
@@ -43,8 +43,7 @@ bool Chunk::Intersection(
        float *dist,
        glm::vec3 *normal) const {
        { // rough check
-               const AABB bb{{0, 0, 0}, {Width(), Height(), Depth()}};
-               if (!blank::Intersection(ray, bb, M)) {
+               if (!blank::Intersection(ray, Bounds(), M)) {
                        return false;
                }
        }