]> git.localhorst.tv Git - blank.git/blobdiff - src/world/World.cpp
figure out depth and normal in box/box test
[blank.git] / src / world / World.cpp
index 82701ce8686f48f20b3f24039a1239547375671f..4ab116c24f79f7f2f9581bdb67553204fd3dcc0f 100644 (file)
@@ -178,6 +178,8 @@ bool World::Intersection(
 bool World::Intersection(const Entity &e) {
        AABB box = e.Bounds();
        glm::mat4 M = e.Transform(player->ChunkCoords());
+       // TODO: this only needs to check the chunks surrounding the entity's chunk position
+       //       need find out if that is quicker than the rough chunk bounds test
        for (Chunk &cur_chunk : chunks.Loaded()) {
                if (cur_chunk.Intersection(box, M, cur_chunk.Transform(player->ChunkCoords()))) {
                        return true;