-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Area2D erroneously emits body_entered signal if collision mask *and* layer are reset. #45131
Comments
Thanks for the issues, #14578 (comment) contains a workaround for the problem. |
Sorry. I've tested it more and this still is a bug related with #14578. |
The other workaround that I did find is to reconnect with the
|
See #69407 for a 4.0 MRP, where the issue is still reproducible. |
Godot version: v3.2.3
OS/device including version: Linux 5.10.2-2-MANJARO
Issue description:
I have an obstacle (Area2D) that "destroys" the player character(KinematicBody2D) on contact using the
body_entered
signal. I then hide the player, disable the collisions and start a timer.I disable collisions by using:
After the timer has run out the player respawns at the start location. I do this by resetting the position and re-enabling collisions.
When the player respawns the Area fires the
body_entered
signal again even though the player character does not collide with the area anymore .This problem only appears if I reset both the collision layer and the mask.
If I reset only one of those it somehow works.
Did I stumble upon a Bug or is this documented behavior?
Other users seem to have a similar problem: https://godotengine.org/qa/56193/how-to-manually-set-the-position-of-a-kinematicbody2d
Steps to reproduce:
body_entered
is emitted againMinimal reproduction project:
collission_example.zip
The text was updated successfully, but these errors were encountered: