From ed5dd285b78b6bba4ae08e00ad91c9e3fa282005 Mon Sep 17 00:00:00 2001 From: Anuken Date: Wed, 13 Nov 2024 10:04:00 -0500 Subject: [PATCH] Cullable check fix --- arc-core/src/arc/scene/Group.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arc-core/src/arc/scene/Group.java b/arc-core/src/arc/scene/Group.java index adc9a65c..80c7b97e 100644 --- a/arc-core/src/arc/scene/Group.java +++ b/arc-core/src/arc/scene/Group.java @@ -195,7 +195,7 @@ public Element hit(float x, float y, boolean touchable){ for(int i = children.size - 1; i >= 0; i--){ Element child = childrenArray[i]; //TODO: this optimization may be incorrect, needs further testing. - if(!child.visible || (cullingArea != null && !cullingArea.overlaps(child.x + child.translation.x, child.y + child.translation.y, child.width, child.height))) continue; + if(!child.visible || (child.cullable && cullingArea != null && !cullingArea.overlaps(child.x + child.translation.x, child.y + child.translation.y, child.width, child.height))) continue; child.parentToLocalCoordinates(point.set(x, y)); Element hit = child.hit(point.x, point.y, touchable); if(hit != null) return hit;