-
-
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
[Bullet] area_shape is 0 in body_shape_entered and body_shape_exited #19290
Comments
I just wanted to add that I have found this to be an issue as well. Using Godot 3.06 and the latest Godot build from source built just a few hours ago. To test:
The above is being used to detect who is adjacent to a character. Placing a break point in the signal function always shows area_shape to be 0 regardless of which shape within the Area node it actually collided with. |
Can you please upload a sample project please? |
See here: From sample it also have bug receive signal even it's not collided. You can set "Project Settings->General->Physics->3d->Physics Engine" and set to "GodotPhysics", so it will be run correctly. |
Just chiming in to say that I experience this issue as well. |
I can confirm the bug in the current master branch (ce75a2f). It works fine with GodotPhysics using the project in #19290 (comment) ( |
Turns out EDIT: |
Anyone working on this? Is it just a matter of replicating the solution from area_2d into area? |
it's still here on 3.2.3 rc3. Please for the love of everything that is pure and good someone fix it :'( |
hello, i don't know if this is the solution or an artefact of the problem (i raised ticket #42614, which was kind of more about lack of documentation and mixing up of parameter names). In the area_shape entered signal, the self_shape parameter actually contains the index of the shape not shape_id, which is always zero, so using this parameter gives the correct result. When you use body_shape enteredsignal is where it gets confusing as the index is called shape_id. So, I dunno if simply the self_shape/shape_id are being mixed up or intentionally like this in area shape entered function? |
I've discovered something worse. I have two different scenes with area2D using multiple collisions and need to check for which collision polygon shape was triggered. In my two methods, one always has area_shape parameter as zero and self_shape parameter as the collision index, I have no idea how it's coded or what's making it choose the parameter but it must have some logic in the code somewhere behind these two parameters causing it :( If you want a video I am happy to share it. Can I produce a small program? I don't know because it's just random which method it chooses to set the index to.
|
Godot version:
v3.1.dev.custom_build.43b7ebf
OS/device including version:
Issue description:
Steps to reproduce:
area_shape
in function will always = 0 event if body had intersect any shape of AreaMinimal reproduction project:
The text was updated successfully, but these errors were encountered: