mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
fix entity bounding box check on block place
This commit is contained in:
parent
9893c09fd5
commit
bb44b4186b
1 changed files with 3 additions and 1 deletions
|
|
@ -482,7 +482,9 @@ 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.intersects(body.hitbox.getAABB(), -0.05f)) {
|
||||
AABB bodyAABB(body.hitbox.getAABB());
|
||||
bodyAABB.scale({1, 0.95f, 1});
|
||||
if (eid.def.blocking && aabb.intersects(bodyAABB)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue