Object falls through btBvhTriangleMeshShape

Rickard Westerlund
Posts: 2
Joined: Sun Feb 17, 2013 8:57 pm

Object falls through btBvhTriangleMeshShape

Post by Rickard Westerlund »

Hello,

I am working on a racing game and have this problem where the vehicle, in the physics world implemented as a capsule shape, will not stay outside of certain static objects. These are obejcts that can't be part of the heightfield for the terrain such as bridges, implemented as btBvhTriangleMeshShapes. When the vehicle tries to drive over these objects it stays on top of them for about half a second and then falls through the mesh.

I'm unsure where to start looking and have little experience with Bullet. For more information the meshes used are not convex. The game is also run on an embedded device with an FPS around 30. Both the vehicles and triangle meshes use custom material callbacks but they don't modify any of the inputs. I would be grateful for any advice.
User avatar
SynapticBytes
Posts: 74
Joined: Thu Feb 10, 2011 8:27 pm

Re: Object falls through btBvhTriangleMeshShape

Post by SynapticBytes »

How fast was your vehicle moving? Did you try to increase the simulation step time, or substeps, to see if you are missing collision detection?

The bvhTriangleMesh is one of the most demanding shapes, performance wise. Maybe you could try a convex hull and see if it changes the response. At least then you'll know if it's a shape issue.
Rickard Westerlund
Posts: 2
Joined: Sun Feb 17, 2013 8:57 pm

Re: Object falls through btBvhTriangleMeshShape

Post by Rickard Westerlund »

It wasn't moving very fast at all, just barely going forwards. I took the time import .bullet files and create structures out of simpler box shapes in Maya and it works a lot better! I didn't test altering the time steps but it seems like a reasonable cause seeing how low the FPS is. Thanks for the help!