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

RigidBody sometimes misses reporting a contact #37308

Open
Tracked by #45333
ChronoDK opened this issue Mar 26, 2020 · 8 comments
Open
Tracked by #45333

RigidBody sometimes misses reporting a contact #37308

ChronoDK opened this issue Mar 26, 2020 · 8 comments

Comments

@ChronoDK
Copy link

Godot version:
3.2.1

Issue description:
The body_entered signal is sometimes not triggered on contact. Not entirely random, but depending on phsyics settings.

Steps to reproduce:
Download minimal project and watch the bounce counter in the console.

Minimal reproduction project:
https://www.dropbox.com/s/a3n3kvam5cd813x/MinimalProject.zip?dl=0

@Saitodepaula
Copy link

I've downloaded the project and the behaviour is the same. I'm using Windows 10 Home.

Setting the physics FPS to 120 seems to solve the problem.

@ChronoDK
Copy link
Author

120 FPS does seem to solve the problem. Including in my more advanced project. I guess performance will suffer though?

@Calinou
Copy link
Member

Calinou commented Mar 26, 2020

Reading the comments, it seems this is yet another case of #9071. See the comments at the end of that issue for possible workarounds.

@Anutrix
Copy link
Contributor

Anutrix commented Mar 26, 2020

120 FPS does seem to solve the problem. Including in my more advanced project. I guess performance will suffer though?

#2092 also seems to be fixed at higher FPS. Could they be related?

@fractilegames
Copy link

I know this is an old issue but I have been experiencing this same thing randomly for a long time. Currently in Godot 3.6 beta 3.

The original reproduction project in this issue is no longer available, so I can't check if this is the exact same setup but is does sound like it.

I don't think this is about CCD or tunneling because the collision happens correctly, it's just not getting reported. For example, I have rigid body missile in my game that sometimes just bumps into its target (another rigid body) and does not explode because body_entered is not emitted.

@Calinou
Copy link
Member

Calinou commented Oct 21, 2023

@fractilegames Please upload a minimal reproduction project1 to make this easier to troubleshoot.

Footnotes

  1. A small Godot project which reproduces the issue, with no unnecessary files included. Be sure to not include the .godot folder in the archive (but keep project.godot).

    Drag and drop a ZIP archive to upload it. Do not select another field until the project is done uploading.

    Note for C# users: If your issue is not Mono-specific, please upload a minimal reproduction project written in GDScript or VisualScript. This will make it easier for contributors to reproduce the issue locally as not everyone has a Mono setup available.

@fractilegames
Copy link

I can't reproduce this consistently. It happens randomly and not very often. I will see if can set up a project where this happens..

@fractilegames
Copy link

I created a minimal test project that brute-forces collisions between two rigid bodies:
MissingContactSignal.zip

That seems the trigger the issue usually in less than 10 tries, which is way more often than I see the issue in my game. It's actually suspiciously often. I hope I didn't make some obvious mistake in the project.

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

No branches or pull requests

6 participants