-
-
Notifications
You must be signed in to change notification settings - Fork 121
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
Contact between a ball and cuboid sometimes and has no contact pair #255
Comments
Managed to capture a gif of it happening, and the log at the same time.
It seems like it happens more often at the borders of the bricks, i.e. where two |
I just had this happen again, but CCD was disabled:
I think this may not be specific to CCD, but having it enabled seems to make it worse. |
Dooskington
changed the title
Contact between a CCD enabled ball and cuboid sometimes and has no contact pair
Contact between a ball and cuboid sometimes and has no contact pair
Apr 11, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not sure if this is only reproducible with a
Ball
hitting aCuboid
, but I have not tested twoCuboid
s or other shapes.Essentially, with my cuboid colliders and ball rigidbody, every once in a while the ball will collide and have no contact pair when I query. This means I can't react to the collision properly and my game just kind of breaks. It is strange though, because the rigidbody is reacting to the collision, either stopping in its place, or sliding along the box collider that it hit.
I made my game repo public with a repro branch here, and the physics code is here. The ball (created in
ball.rs
) has a mass of 1.0 and the rest of the colliders and paddle are just boxes set up ingame/mod.rs
.If you manage to compile and run it and want to actually repro, use A/D or Left/Right to move the paddle, and spacebar to launch the ball. This seems to be easiest to repro if you just bounce the ball back and forth on the Y axis, hitting the paddle (collider index 0) and the brick directly above. Eventually, the ball will reflect strangely or stop entirely and you can observe that no contact pair was found:
If you enable the
println!()
under thephysics.step()
, we can see that this isn't a case of a contact event starting and stopping on the same step (there would be a 'contact stopped' logged):Messing with the ccd parameters doesn't seem to help. Disabling CCD seems to improve the situation but does not fix it.
The text was updated successfully, but these errors were encountered: