ITS BROKEN

This commit is contained in:
Jan Racek
2026-03-29 16:14:15 +02:00
parent 7c344e2e37
commit 9a82f9e3a1
10 changed files with 179 additions and 50 deletions

View File

@@ -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);
}
}