Ball - trimesh collision problem
Posted: Sat Aug 05, 2006 3:34 pm
To see how stable the collision detection is in Bullet, I set up a app with a ball and a static trimesh, and dropped the ball onto the trimesh from various different heights. When it hits, I record the velocity (from GetLinearVelocity()).
I always get a collision (from PersistentManifold::GetNumContacts() ), but sometimes the ball just falls straight through the trimesh. When it does, the impact speed is less than the predicted speed, but still of a reasonable value. When the ball does not fall through, the velocity is very small.
These are the sort of figures I get (gravity = -40):
I am using a timestep of 0.02, ball diameter=1, collision margin =0.01. I know I can increase the number of timesteps, and that seems to fix the problem. But I am still concerned that this is a bug, and Bullet may not be stable enough for my needs. Which would be a shame, Bullet is alot easier to use than ODE and in my opinion a better choice for game development. The CCD is more robust than ODE which really suffers from object-trimesh tunnelling when the object moves more than it's maximum bounding box size in a single timestep.
So I would really like to know if this is a known issue with Bullet, and if there is a way to stop this problem hapenning. Any help would be appreciated!
I always get a collision (from PersistentManifold::GetNumContacts() ), but sometimes the ball just falls straight through the trimesh. When it does, the impact speed is less than the predicted speed, but still of a reasonable value. When the ball does not fall through, the velocity is very small.
These are the sort of figures I get (gravity = -40):
Code: Select all
Height Impact speed |GetLinearVeolcity()| Falls through?
16 36 36 YES
20 40 7.28 NO
158 112 93 YES
268 146 6.26 NO
368 172 130 YES
618 222 149 YES
(this is about the maximum speed I can get collisions at, which I guess works out at about 5m of travel per timestep)So I would really like to know if this is a known issue with Bullet, and if there is a way to stop this problem hapenning. Any help would be appreciated!