how to make an Area2D react to another Area2D

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

so this is a rough sketch of my code

func _process(delta):
var bodies = get_overlapping_bodies()
for body in bodies:
	if body.name == "Area2D":

if this is suposted to work than i will also say that the Area2D is saved as a branch_scene.

:bust_in_silhouette: Reply From: drorya

did you try using get_overlapping_areas() instead?
because I think get_overlapping_bodies() only reacts to PhysicsBodies

i shall try.
And now that i think about it thats most likely the problem

Superkrypet | 2020-06-02 13:13

Actually it did work

Superkrypet | 2020-06-02 13:38