ITS BROKEN
This commit is contained in:
@@ -169,11 +169,12 @@ int CollisionSystem::detectCollisions(const AABB& playerAABB, psyqo::Vec3& pushB
|
||||
m_resultCount = 0;
|
||||
const FP zero(0);
|
||||
pushBack = psyqo::Vec3{zero, zero, zero};
|
||||
|
||||
// Rebuild spatial grid with all colliders
|
||||
|
||||
// Rebuild spatial grid with active colliders only
|
||||
m_grid.clear();
|
||||
for (int i = 0; i < m_colliderCount; i++) {
|
||||
if(scene.getGameObject(m_colliders[i].gameObjectIndex)->isActive()) {
|
||||
auto* go = scene.getGameObject(m_colliders[i].gameObjectIndex);
|
||||
if (go && go->isActive()) {
|
||||
m_grid.insert(i, m_colliders[i].bounds);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user