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

Collisions/contacts are not detected and/or accessible to scripts #250

Closed
werner291 opened this issue Sep 7, 2024 · 1 comment · Fixed by #258
Closed

Collisions/contacts are not detected and/or accessible to scripts #250

werner291 opened this issue Sep 7, 2024 · 1 comment · Fixed by #258
Labels
bug Something isn't working

Comments

@werner291
Copy link

Describe the bug

On rare occasions, the body_entered signal is not triggered when collisions occur. The bodies actually collide as they are supposed to, so it is not a tunneling issue.

To Reproduce

The bug is inconsistent and hard to reproduce. The attached project forces the shapes to follow a trace of a known instance where the bug occurs (it releases the ball 5 frames before impact, so the physics engine should be fully in control there)

in the following video, notice how the first bounce off the paddle causes output on the console, but not the second:
https://github.com/user-attachments/assets/55400bb5-97c1-4d66-a6ea-a0c1ead3eee9

Perhaps the following details are relevant, perhaps they are not:

  • The ball has cast-shape CCD enabled
  • The paddle has a polygon shape

Expected behavior

A collision should always consistently trigger some or the other signal that my script can respond to. "body_entered" is typically recommended for this sort of thing.

Environment:

  • OS: NixOS Ynstable
  • Godot Version: 4.3
  • Type: SIMD 2D (plugin 0.8.4

Example project(zip)

Breakout (copy).tar.gz

@werner291 werner291 added the bug Something isn't working label Sep 7, 2024
@Ughuuu
Copy link
Contributor

Ughuuu commented Sep 23, 2024

Seems like some events are dropped because the distance of collision is positive in some cases. Need to investigate why.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants