bullet Box penetration

Started by
2 comments, last by medigames 8 years, 1 month ago

Hi
this is the first time i'm using bullet physics, and i have encounter a problem that i don't know if it's known in bullet library.
the problem is that when boxes rest, they penetrate each other.

im using the default btSequentialImpulseConstraintSolver.
this is an image of what i mean.

473314Bulletphysics.png

this is how i get the world transform

btTransform bttransform;

aBtRigidBody[uIdx].getMotionState()->getWorldTransform(bttransform);
Advertisement
I suspect you have setup the collision shape incorrectly, or something else incorrectly in your code. I doubt this simple problem is related to Bullet.

Before running the simulation, create a debug unit test for the shapes, rendering vertices, and normals appropriately (e.g. check if a box has correct extents assigned to it). You shouldn't just throw them in on bodies without validating before.

Also, read Bullet's documentation carefully. It is a very granular API IMHO which might help you to miss things easily.
Agree with Irlan. There is no way your screenshot penetrations are something that happens with Bullet if set up properly. It looks as though your collision shapes are smaller than the shapes you are rendering, or even that you have a sphere shape in Bullet but are rendering a box.

In fact, if anything, Bullet will exhibit the opposite behaviour as it will maintain a tiny gap between objects that one has to generally hide by scaling up the rendered objects slightly if it is a problem.

yeap, that was my bad, the problem was a quaternion mat3 conversion.

thank you all,

This topic is closed to new replies.

Advertisement