From f3889421d833991b11d26957388b58cb8cea7293 Mon Sep 17 00:00:00 2001 From: MihailRis Date: Wed, 29 Nov 2023 13:21:31 +0300 Subject: [PATCH] AABB.inside fix --- src/maths/aabb.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/maths/aabb.h b/src/maths/aabb.h index 097e772f..c0e1a501 100644 --- a/src/maths/aabb.h +++ b/src/maths/aabb.h @@ -23,8 +23,8 @@ struct AABB { inline bool inside(const glm::vec3 pos) const { const glm::vec3 p = min(); const glm::vec3 s = size(); - return !(pos.x < p.x || pos.y < p.y || - pos.x >= p.x+s.x || pos.y >= p.y+s.y); + return !(pos.x < p.x || pos.y < p.y || pos.z < p.z || + pos.x >= p.x+s.x || pos.y >= p.y+s.y || pos.z >= p.z+s.z); } };