optimize collisions calculations (remove the stupid)

This commit is contained in:
MihailRis 2026-02-18 18:54:49 +03:00
parent 49aa7cdfba
commit b0d231c927
9 changed files with 134 additions and 103 deletions

View file

@ -450,7 +450,7 @@ void Entities::render(
bool Entities::hasBlockingInside(AABB aabb) {
auto view = registry->view<EntityId, Rigidbody>();
for (auto [entity, eid, body] : view.each()) {
if (eid.def.blocking && aabb.intersect(body.hitbox.getAABB(), -0.05f)) {
if (eid.def.blocking && aabb.intersects(body.hitbox.getAABB(), -0.05f)) {
return true;
}
}