Can add any objects that inherit from AABB into the Octree.

This commit is contained in:
William Moberg
2016-01-19 14:50:46 +01:00
parent 621d935d7a
commit 713ebbe18c
8 changed files with 224 additions and 189 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ void CollisionSystem::UpdateComponent(World* world, EntityWrapper& entity, Compo
// Collide against octree
std::vector<AABB> octreeResult;
m_Octree->BoxesInSameRegion(*boundingBox, octreeResult);
m_Octree->ObjectsInSameRegion(*boundingBox, octreeResult);
for (auto& boxB : octreeResult) {
glm::vec3 resolutionVector;
if (Collision::IsSameBoxProbably(boxA, boxB)) {