You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure if this is only reproducible with a Ball hitting a Cuboid, but I have not tested two Cuboids 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 in game/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:
contact started: handle1: Index { index: 54, generation: 0 }, handle2: Index { index: 0, generation: 0 }
No contact pair found for collision!
If you enable the println!() under the physics.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):
step
contact started: handle1: Index { index: 54, generation: 0 }, handle2: Index { index: 0, generation: 0 }
No contact pair found for collision!
step
step
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:
I just had this happen again, but CCD was disabled:
step
contact started: handle1: Index { index: 54, generation: 0 }, handle2: Index { index: 44, generation: 0 }
No contact pair found for collision!
step
step
contact started: handle1: Index { index: 54, generation: 0 }, handle2: Index { index: 43, generation: 0 }
No contact pair found for collision!
step
step
step
contact stopped: handle1: Index { index: 54, generation: 0 }, handle2: Index { index: 44, generation: 0 }
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
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: