get_overlapping_bodies on area2d ?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By quizzcode

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 !

:bust_in_silhouette: Reply From: quizzcode

get_overlapping_areas()

to myself :slight_smile: