mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
optimize collisions calculations (remove the stupid)
This commit is contained in:
parent
49aa7cdfba
commit
b0d231c927
9 changed files with 134 additions and 103 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue