Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

regression in Area2D monitoring which results in callbacks missing #44632

Closed
Tracked by #45334
snaar opened this issue Dec 23, 2020 · 2 comments · Fixed by #44695
Closed
Tracked by #45334

regression in Area2D monitoring which results in callbacks missing #44632

snaar opened this issue Dec 23, 2020 · 2 comments · Fixed by #44695

Comments

@snaar
Copy link

snaar commented Dec 23, 2020

Godot version: appears since 3.2.3 and still exists in head of 3.2 branch; 3.2.2 does not have this issue; I've done git bisect and it points at this commit, which does looks relevant: ccdfaf2

Issue description:
I noticed unexpected missing area_entered callbacks when playing around with Godot book example code from https://github.com/vnen/Godot-24-Hours/tree/master/Godot-Hour5/finished-project-with-exercises

I've narrowed down the issue to the attached repro project that doesn't need any human input to observe the issue.

There is whole bunch of stuff happening to the scene tree and the monitored areas in the project, which results in that sometimes the _on_player_area_entered callback is not called when asteroid's area enters player's area.

The scene is setup that player (i.e. ship) periodically spawns the shots that immediately queue_free() themselves - key here seems to be that they are spawned overlapping the ship's area. If shots do not overlap then there is no issue. Then asteroids are periodically spawned and move towards the ship. They are expected to trigger _on_player_area_entered, which then will draw an explosion around the ship. Before commit ccdfaf2 it happens consistently for every asteroid. After commit ccdfaf2 it does NOT happed for every asteroid.

Steps to reproduce:
Open attached project in 3.2.3 and hit play button. Observe that sometimes there is no explosion around the ship as asteroid hits it. For comparison, open it in 3.2.2 and observe that there is consistently an explosion around the ship as asteroids hit it.

Minimal reproduction project:
repro-20201223.zip

@Calinou
Copy link
Member

Calinou commented Dec 23, 2020

cc @madmiraal

@madmiraal
Copy link
Contributor

Fixed with #44695 and its 3.2 version #44696.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants