Damn bullet physics

I don’t know if this is some sort of error, but it seems like a dynamic object can’t smoothly go over a flat surface that has multiple faces. It gets “stuck” occasionally on a flat edge. Really pisses me off.

I’ve tried playing around with the physics, but no matter what it always does this. I guess the only way to overcome it is to slightly raise or lower the edge where my guy gets stuck. But this means that I could never do a track for my “cart” that is totally flat…kinda sucks.

Attachments


There have been lots of car games made here using the Bullet Physics engine… maybe find some examples… download them… then dissect how they were made…

Have you tried changing the bounds shape for your cart? If it’s a box then it will have a sharp edge at the front. If you created a custom shape that’s more like a sledge or with rounded edges at the front (not too much or the complexity will kill frame rates) then it might be less likely to get stuck on sharp edges. I found this out when trying to get a character to move up stairs… not possible with bounds set to box. :no:

Most cars have wheels, see the raycast vehicle demo in the game physics regression files, so the chassis doesn’t slide over the ground. This uses a vehicle constraint, setup through Python scripts. Alternatively you can use the vehicle or FH/FHRot to keep the chassis floating above the ground.

If you really want to slide an objected without wheels, it is best to use a rounded shape such as a sphere. Otherwise you can try to set the Contact Procession Threshold (CPT see picture) of the vehicle/character to zero. If that doesn’t help enough, try increasing the margin. Or use another collision shape, such as sphere.

http://bulletphysics.com/cpt.png

Hope this helps,
Erwin