From 8341ddc450bd160b5cb44eeb0400da2e5a151ed0 Mon Sep 17 00:00:00 2001 From: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> Date: Sun, 14 Jan 2024 13:36:05 +0100 Subject: [PATCH] Fix AABB.encloses failing on shared upper bound This differs from `Rect2` and was fixed for those classes in the past --- core/math/aabb.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/math/aabb.h b/core/math/aabb.h index 48bd39e3c..73be70f45 100644 --- a/core/math/aabb.h +++ b/core/math/aabb.h @@ -187,11 +187,11 @@ inline bool AABB::encloses(const AABB &p_aabb) const { return ( (src_min.x <= dst_min.x) && - (src_max.x > dst_max.x) && + (src_max.x >= dst_max.x) && (src_min.y <= dst_min.y) && - (src_max.y > dst_max.y) && + (src_max.y >= dst_max.y) && (src_min.z <= dst_min.z) && - (src_max.z > dst_max.z)); + (src_max.z >= dst_max.z)); } Vector3 AABB::get_support(const Vector3 &p_normal) const {