- Edited
i want to monitor a area2D whether it is overlapping the Area2D ,but i find that when i enable it in the Area2D it doesn’t work.the function “on_area_entered “ only works when the area entering from outside to inside.
here’s the photo:
i want to monitor a area2D whether it is overlapping the Area2D ,but i find that when i enable it in the Area2D it doesn’t work.the function “on_area_entered “ only works when the area entering from outside to inside.
here’s the photo:
This is by design, if you want to have code running while the node is within the area, you should enable a declared boolean and have that only turn off when the node you want to keep track of exits. Or sorry, I didn't double check your diagram, if you want to have an area within an area just make two of them attached to two separate nodes, they will work fine as well.
You can run "get_overlapping_areas" inside process call to check for it
shufen sorry but what does the code say? it could be coded wrong. you'd be surprised what a misplaced spacing can do. ahem voice of experience.
also are you connecting the signal to the object once it is out? are you checking the area name to make sure it triggers? and what are you triggering, a global or local?