Skip to content

Commit

Permalink
Cullable check fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Anuken committed Nov 13, 2024
1 parent ecadb9b commit ed5dd28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arc-core/src/arc/scene/Group.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ed5dd28

Please sign in to comment.