Hello! I am quite new to Godot and I have an issue with Area2D collision detection. Basically, What I want is when a player overlaps that tree, the tree becomes transparent, like in Stardew Valley. The mechanics works but I also get collision when the body of player is not overlapping the tree Area2D (first GIF) and also there is weird behaviour while overlapping (second GIF). This problem is intermittent, meaning it’s not always happening:
I had the player scene set on Autoload because I wanted to use it in Tree scene. Thus, I had another instance of player, behind the world tiles and I couldn’t see it. This instance was also interacting with tree’s area2Ds and consequently the behaviour in my topic.
In order to get the player characterbody2D in the tree scene I used Area2D.get_overlapping_bodies() method