From cfc62c27e5550b2207633269933c9c169db0036d Mon Sep 17 00:00:00 2001 From: Alvaro Barua Date: Wed, 10 Mar 2021 19:04:24 +0000 Subject: [PATCH] Clip bounds only when both bound ends are not visible. I think its the correct behaviour since you can make them clip while moving and it looks odd. --- ImGuizmo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ImGuizmo.cpp b/ImGuizmo.cpp index 90f926ff..98eadfe1 100644 --- a/ImGuizmo.cpp +++ b/ImGuizmo.cpp @@ -1531,7 +1531,7 @@ namespace ImGuizmo { ImVec2 worldBound1 = worldToPos(aabb[i], boundsMVP); ImVec2 worldBound2 = worldToPos(aabb[(i + 1) % 4], boundsMVP); - if (!IsInContextRect(worldBound1) || !IsInContextRect(worldBound2)) + if (!IsInContextRect(worldBound1) && !IsInContextRect(worldBound2)) { continue; }