i have occured a really strange problem, i create a rigid body of player(use convex shape), the ground is a heightfiled shape, most time the simulation is ok, but in some place the penetration is very deep, i do ray test in that place and get the right result, i tried reducing the timestep, but no help. very confused, any hints?
btw, most code orgin from the character controller demo, only not use motion state.
why some place the penetration is so deep?
-
- Posts: 3
- Joined: Sat Jun 14, 2008 12:26 am
why some place the penetration is so deep?
You do not have the required permissions to view the files attached to this post.
-
- Posts: 3
- Joined: Sat Jun 14, 2008 12:26 am
Re: why some place the penetration is so deep?
just let you know, I have resolved the problem by using btBvhTriangleMeshShape replace btHeightfieldTerrainShape. so it's maybe a bug in btHeightfieldTerrainShape.
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: why some place the penetration is so deep?
There are several ways of triangulating a heightfield, it has to match the convention you use for rendering. Have you tried different settings for flipQuadEdges and/or setUseDiamondSubdivision?
Have you implemented a debug drawer (derived from btIDebugDraw), to make sure your rendering matches the physics tesselation of the heightfield?
Thanks,
Erwin
Have you implemented a debug drawer (derived from btIDebugDraw), to make sure your rendering matches the physics tesselation of the heightfield?
Thanks,
Erwin
-
- Posts: 3
- Joined: Sat Jun 14, 2008 12:26 am
Re: why some place the penetration is so deep?
yes, I'm sure the physics and render using the same triangle(i do implement a debug drawer derived from btIDebugDraw), and i can get right height value when using ray test. I tried other shapes (capsulte) on the character but result is same, worth to mention, the impulse resolver seems know about the penetration and tried to push the character up.
hope this can help and thanks for the great library
hope this can help and thanks for the great library
-
- Posts: 508
- Joined: Fri May 30, 2008 2:51 am
- Location: Ossining, New York
Re: why some place the penetration is so deep?
you could try chucking some boxes and spheres around to test the ground works ok