From 227487f58c85942ddfaa56adeeb6aedeb6357b0a Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sun, 1 Oct 2023 02:47:54 +0200 Subject: [PATCH] Use bitwise and for spawner overlap collision mask --- spawner/spawner.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spawner/spawner.gd b/spawner/spawner.gd index 1867032..9c2a33a 100644 --- a/spawner/spawner.gd +++ b/spawner/spawner.gd @@ -28,7 +28,7 @@ func _count_overlapping_bodies() -> int: var overlapping_bodies = area.get_overlapping_bodies() var overlapping_body_count = 0 for overlapping_body in overlapping_bodies: - if overlapping_body.collision_layer && overlapping_bodies_collision_mask: + if overlapping_body.collision_layer & overlapping_bodies_collision_mask: overlapping_body_count += 1 return overlapping_body_count