Chinamming / bullet

Automatically exported from code.google.com/p/bullet
Other
0 stars 0 forks source link

pair of btBvhTriangleMeshShape don't collide #682

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It's hard to believe that there would be such a fundamental bug, but it seems 
like a pair of btBvhTriangleMeshShape never collide.

Two attached files:
- modified DemoApplication.cpp, so you can shoot mesh boxes and verify that 
they don't collide with each other (but they collide with other objects)
- a simple example showing that no contact manifolds are generated

Checked on bullet 2.81rev2613

Original issue reported on code.google.com by john.d.s...@gmail.com on 14 Dec 2012 at 3:22

Attachments:

GoogleCodeExporter commented 9 years ago
If you try to attempt to compute the inertia tensor for a 
btBvhTriangleMeshShape , you will get an assert. It should be made even more 
obvious that btBvhTriangleMeshShape  should only be used for static, non-moving 
collision geometry.

I added some more comments in the header file, and will add more obvious 
information in the Bullet user manual soon (the pdf version, included in the 
SDK).
http://code.google.com/p/bullet/source/diff?spec=svn2630&r=2630&format=side&path
=/trunk/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h

For moving concave triangle meshes, it is recommended to perform convex 
decomposition, using HACD, see Bullet/Demos/ConvexDecompositionDemo. 
Alternatively you can use GImpact for moving concave meshes, but that is not 
reliable in all cases, so convex decomposition + btCompoundShape is the only 
option.

I'm looking into fixing the gimpact shape, and possibly merge its functionality 
into btBvhTriangleMeshShape in the future.

Original comment by erwin.coumans on 14 Dec 2012 at 8:36

GoogleCodeExporter commented 9 years ago
Thanks for the quick response. I was just using bullet for collision checking 
so naturally I didn't hit the assert.

Original comment by john.d.s...@gmail.com on 15 Dec 2012 at 12:48

GoogleCodeExporter commented 9 years ago
If you really want moving concave triangle meshes, you could try GImpact. See 
Bullet/Demos/MovingConcaveDemo or Bullet/Demos/GImpactDemo

Also, I just created a new utility that can create a btCompoundShape using a 
GImpact mesh.

See https://code.google.com/p/bullet/source/detail?r=2631 and
btCompoundFromGImpact.h header

Original comment by erwin.coumans on 15 Dec 2012 at 1:06