mirror of
https://github.com/Steffo99/swear-jar.git
synced 2024-11-21 23:34:18 +00:00
Use bitwise and for spawner overlap collision mask
This commit is contained in:
parent
5f3e361a9d
commit
227487f58c
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue