Jump to content
  • Advertisement
Sign in to follow this  
medigames

bullet Box penetration

This topic is 1026 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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);
Edited by medigames

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!