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

Physics2DServer doesn't send body info to signals #12215

Closed
Tracked by #45334
bitbionic opened this issue Oct 18, 2017 · 6 comments · Fixed by #42742
Closed
Tracked by #45334

Physics2DServer doesn't send body info to signals #12215

bitbionic opened this issue Oct 18, 2017 · 6 comments · Fixed by #42742

Comments

@bitbionic
Copy link

bitbionic commented Oct 18, 2017

Found on Linux Mint 18.1, Intel i7, NVIDIA Gtx 660m
Godot 2.1.4-stable

Using the Bullet Shower demo, place a break-point in the _on_player_body_enter_shape or _on_player_body_exit_shape functions . You'll notice that there is no body or information about the body per the debug screenshot attached. I found / reproduced this in another project when I was using the same technique as the Bullet Shower demo. I don't someone can remove the physics body based on collision without this information because there is no identifier present.

debugbulletshower

Link to minimal example project:
Use Bullet Shower Demo.
https://github.com/godotengine/godot-demo-projects/tree/2.1/2d/shower_of_bullets

@ghost ghost modified the milestones: 3.0, 2.1 Oct 19, 2017
@akien-mga
Copy link
Member

The 2.1 branch is no longer actively worked on by engine developers, unless critical fixes are needed for current games in production. As such we are now closing non-critical bug reports affecting only the 2.1 branch.

Please comment if this was incorrectly triaged and is still relevant in 3.x versions.

@akien-mga
Copy link
Member

Actually tested in the master branch and it's still valid.
screenshot_20180917_174722

@akien-mga akien-mga reopened this Sep 17, 2018
@akien-mga akien-mga removed this from the 2.1 milestone Sep 17, 2018
@ericdsw
Copy link

ericdsw commented Mar 20, 2019

This appears to be happening with areas as well, area_shape_entered signal is correctly calling my _on_Area2D_area_shape_entered method, but the area_id is always 1 and the area is null.

@KoBeWi
Copy link
Member

KoBeWi commented Jun 13, 2020

Can anyone still reproduce this bug in Godot 3.2.1 or any later release (e.g. 3.2.2-beta4)?

If yes, please ensure that an up-to-date Minimal Reproduction Project (MRP) is included in this report (a MRP is a zipped Godot project with the minimal elements necessary to reliably trigger the bug). You can upload ZIP files in an issue comment with a drag and drop.

@Listwon
Copy link
Contributor

Listwon commented Sep 15, 2020

@KoBeWi It's still reproducible in Godot 3.2.2, but the thing is that this behaviour seems reasonable. area or body is null, because there are no Area2D or KinematicBody2D nodes in the SceneTree (except of the player node). area_id in my case is always 0 (default value I guess).
shower_of_bullets_areas_3_2_2.zip

@KoBeWi
Copy link
Member

KoBeWi commented Sep 15, 2020

I think area_id should be RID of the area, even if there's no node.

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.

5 participants