Hey there !
Working on a tower that would give an "aura" of bonus to the surround towers.
I separated the enemies and the towers in 2 groups of respective names.
Now. When my i place my tower i run this :
Placing the tower :
$entities.add_child(new_tower)
new_tower.add_to_group("towers")
And this :
var towers := []
for overlapping_body in get_overlapping_bodies():
if overlapping_body.is_in_group('towers'):
towers.append(overlapping_body)
print("we have detected a tower")
And nothing... But if I change the name group "towers" with enemies, it detect my enemies (kinematic2d).
Is there any restrictions im not aware of regarding area2d ?
thanks !