Open LPGhatguy opened 1 year ago
Sorry it took me so much time to start looking into this issue. I think two things need to happen to fix this:
Thank you for looking into this! We're still working on this project and still using rapier, so I'm very excited to test any changes that you come up with.
Hey @LPGhatguy! I’ve got some news. Would you like to give https://github.com/dimforge/rapier/pull/625 a try? My recommendations are to:
ColliderBuilder::trimesh(...).contact_skin(your_contact_skin_value)
.RigidBodyBuilder::dynamic().soft_ccd_prediction(5.0)
. (I picked 5.0 arbitrarily here.)Please let me know if that works or doesn’t. The work on improving triangle mesh behaviors has progressed quite a bit here, but there are still a few open questions. The thin-object on thin-terrain problem is generally quite challenging.
Thank you again for your patience!
Hi @sebcrozet I've been struggling with stability in collisions for my racing game where the track is a big trimesh and cars are convex decompositions, tried tuning a bunch of rapier parameters to no avail, sometimes after a collision the car would seemingly gain energy out of nowhere and go flying, I'm happy to report that after trying contact skin on the track and soft ccd on the car and playing with it for 15 minutes, the collisions seem a lot more realistic and I haven't had my car go flying yet, I'm cautiously optimistic since this seems to occur randomly but if it works, this is fantastic! I was starting to worry I'd have to drop rapier and move to a wrapped c++ physics engine, great job!
@raycar5 Glad to hear that! Let me know if you still encounter a similar issue.
Hello!
We're working on a game that has terrain and physics objects. We're using
TriMesh
for representing that terrain currently. We have been having issues with objects falling through the terrain even without large velocities or forces being applied.https://github.com/dimforge/rapier/assets/654598/bc0847ea-6bd4-4475-bff8-3f8d5d8fccba
Here is a video of one of the parts we've been experiencing this issue with. The rapier debug visualization is enabled.
The ground here is a trimesh with four vertices. The slab is a convex hull that is 2x0.03x2. Gravity is -9.81.
We've noticed this issue with slabs as thick as 10cm, but the issue happens very frequently with objects like this one.
The dragger used in the video moves the object slightly above the plane and rotates it before dropping it again. We can see from the debug visualization that there are correct contacts being computed on the corners, but that doesn't stop the entire object from falling through the terrain as it rotates.