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

jittering and jumpyness with sharp convex hulls (rapier3d-compat) #455

Closed
drcmda opened this issue Feb 12, 2023 · 1 comment · Fixed by dimforge/parry#127
Closed

jittering and jumpyness with sharp convex hulls (rapier3d-compat) #455

drcmda opened this issue Feb 12, 2023 · 1 comment · Fixed by dimforge/parry#127

Comments

@drcmda
Copy link

drcmda commented Feb 12, 2023

Convex hulls seem to be a lot less prone to resting, the jumpyness/jittering is sometimes out of control. It seems to get worse when the geometry is sharp or has long, pointy tips. Here's an example:

Screen.Recording.2023-02-12.at.12.24.11.mp4

This is using https://github.com/pmndrs/react-three-rapier which runs "@dimforge/rapier3d-compat": "0.11.1"

And a small repro: https://codesandbox.io/s/quiet-mountain-bi1cvj?file=/src/App.js

@Mik-pe
Copy link

Mik-pe commented Feb 20, 2023

I also have this issue but using native rapier3d.

@sebcrozet

I think I managed to reproduce this in the rapier3d "convex_polyhedron" example.
in convex_polyhedron3.rs from current master (2e929bb):

diff --git a/examples3d/convex_polyhedron3.rs b/examples3d/convex_polyhedron3.rs
index 980720a..2b6f03b 100644
--- a/examples3d/convex_polyhedron3.rs
+++ b/examples3d/convex_polyhedron3.rs
@@ -26,7 +26,7 @@ pub fn init_world(testbed: &mut Testbed) {
     /*
      * Create the polyhedra
      */
-    let num = 5;
+    let num = 1;
     let scale = 2.0;
     let border_rad = 0.1;
 
@@ -46,7 +46,7 @@ pub fn init_world(testbed: &mut Testbed) {
                 let z = k as f32 * shift - centerz;
 
                 let mut points = Vec::new();
-                for _ in 0..10 {
+                for _ in 0..1000 {
                     let pt: Point<f32> = distribution.sample(&mut rng);
                     points.push(pt * scale);
                 }

Do the triangles get too dense in the convex collider?
Attached screen recording from this diff:

2023-02-20.12-19-05.mp4

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