Hello everyone,
Each vehicles has two radars: one to detect and move to the target, one to the turret (stop and fire).
When the firsts targets are "destroyed", i want the nexts targets are set up as the new targets. But, when the firsts targets are freed, theirs "area exited" signals still active, but i don't want that.
I have multiple error with get_overlapping_areas()
, because "overlapping bodies monitoring are off". This is because i have disabled the shape (in the center of the onwer) who is detected by the radar when the shape's owner is destroyed, i do that to remove it from the detection.
I don't find a way to solve this...

func _on_radarChassis_area_exited(area):
if cheminUnit.empty() and area.get_overlapping_areas().size() != 0:
var itemList = []
var listDist = []
for item in area.get_overlapping_areas():
if item.get_parent().is_in_group('unitGrp') and item.get_parent().nationCol != nationCol:
itemList.append(item.get_parent())
listDist.append(position.distance_to(item.get_parent().position))
if itemList.size() != 0:
var minDist = listDist.min()
if position.distance_to(itemList[listDist.find(minDist)].position) <= $radarChassis/perimChassis.shape.radius:
set_physics_process(false)
targetUnit = itemList[listDist.find(minDist)]
move(targetUnit.position)