godotengine / godotengine/godot

get_overlapping_areas() can`t detect resumed Area2D from pause.

Open
#89,615 2 comments 0 reactions 0 assignees View on GitHub
bug topic:2d topic:physics
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

4.2.1.stable, 4.3.dev5

### System information

win11

### Issue description

Area.get_overlapping_areas() can`t detect resumed Area2D from pause. Where Area2D disable mode is set to remove, pause by setting process_mode to disable.

### Steps to reproduce

make a scene like this

![image](https://github.com/godotengine/godot/assets/91177204/ed4dab68-47d3-4ab6-9c5e-e86575f7fe4e)
```

extends Node2D

@onready var area_2d = $Area2D
@onready var area_2d_2 = $Area2D2

func _ready():
print("timer 0.2")
await get_tree().create_timer(0.2).timeout
print("area_2d overlap")
print(area_2d.get_overlapping_areas())
print("timer 0.2")
await get_tree().create_timer(0.2).timeout
print("pasue area2")
area_2d_2.process_mode = Node.PROCESS_MODE_DISABLED
print("timer 0.2")
await get_tree().create_timer(0.2).timeout
print("area_2d overlap")
print(area_2d.get_overlapping_areas())
print("resume area2")
area_2d_2.process_mode = Node.PROCESS_MODE_INHERIT
print("timer 0.2")
await get_tree().create_timer(0.2).timeout
print("area_2d overlap")
print(area_2d.get_overlapping_areas())
print("move area_2d2 Vector2.RIGHT * 0.1")
area_2d_2.position += Vector2.RIGHT * 0.1
print("timer 0.2")
await get_tree().create_timer(0.2).timeout
print("area_2d overlap")
print(area_2d.get_overlapping_areas())
```
output
![image](https://github.com/godotengine/godot/assets/91177204/a3b4d3c7-d86d-40cb-89a0-4846f9101979)
The area_2d_2 is detected after its position changes.

### Minimal reproduction project (MRP)

[BugArea2d.zip](https://github.com/godotengine/godot/files/14628142/BugArea2d.zip)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.