Problem with mesh collider

Pekka
Posts: 2
Joined: Wed Nov 03, 2010 8:34 am
Location: Helsinki / Finland

Problem with mesh collider

Post by Pekka »

Hello,

We are working on a small racing game where there are vehicle colliders using btMultiSphereShape and terrain from btBvhTriangleMeshShape.

The problem is that the cars seem to collide to terrain mesh internal edges as if there were random stones on the track which causes vehicle's forward section pitch upward.
I have tried to adjust mesh collider margin, frictions, restitution, gravity etc. properties, with and without triangle indexing and quantized aabb compression. Nothing seems to fix it. I have also tried to replace btBvhTriangleMeshShape by btGImpactMeshShape, but the behavior is similar.

Collision shape sizes are in recommended sizes (0.5 - to 10.0 meter for spheres and triangles in mesh). We have few tracks where the terrain collider is large quad divided to two triangles. On these terrains the vehicles seem to move well when there are no elevations.

The cars are animated using applyForce function on rigid bodies.
The physic world is stepped with maxSubSteps 1 and fixedTimeStep 1/60.

Is this known behavior or are there some treshold values we could still try to adjust or something to try? Or any good workarounds?

Thanks for any information.
Pekka
Posts: 2
Joined: Wed Nov 03, 2010 8:34 am
Location: Helsinki / Finland

Re: Problem with mesh collider

Post by Pekka »

Mesh collision was succesfully fixed by using the btInternalEdgeUtility. Read more about its usage at here if you have similar problems.
Thanks for help.