fix: bounding box calculation in aabb-aabb collision

main
Sara 2025-01-06 10:55:30 +01:00
parent 19d15fa2a3
commit 60c320fb10
1 changed files with 1 additions and 1 deletions

View File

@ -95,7 +95,7 @@ bool CollisionShape::overlap_aabb_aabb(ShapeAABB lhs, Transform lhst, ShapeAABB
std::abs((lhst.position.y - lhs.v_extent) - (rhst.position.y + rhs.v_extent)),
lhs.v_extent, rhs.v_extent
})};
return bound_x < (lhs.h_extent + rhs.h_extent) || bound_y < (lhs.v_extent + rhs.v_extent);
return bound_x < (lhs.h_extent + rhs.h_extent) && bound_y < (lhs.v_extent + rhs.v_extent);
}
CollidableNode *CollisionShape::get_owner() const {