Browse Source

Fix `AABB.encloses` failing on shared upper bound

A Thousand Ships 1 year ago
parent
commit
3943e41d2f
1 changed files with 3 additions and 3 deletions
  1. 3 3
      include/godot_cpp/variant/aabb.hpp

+ 3 - 3
include/godot_cpp/variant/aabb.hpp

@@ -201,11 +201,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 {