bulletphysics / bullet3

Bullet Physics SDK: real-time collision detection and multi-physics simulation for VR, games, visual effects, robotics, machine learning etc.
http://bulletphysics.org
Other
12.58k stars 2.87k forks source link

User manual references nonexistent btGimpactTriangleMeshShape #2392

Closed mast4461 closed 3 years ago

mast4461 commented 5 years ago

The image on page 13 of the user manual (at least versions 2.82 and 2.83) suggests to use btGimpactTriangleMeshShape to handle collisions for moving objects that can not be approximated as a single primitive, a convex hull of a triangle mesh, or a compound shape:

image

There is no occurrence of the word btGimpactTriangleMeshShape in the current source code. There is however something called btGImpactMeshShape. Perhaps that would be the correct suggestion, although I'm not yet familiar enough with the source code to know that.

jrz371 commented 5 years ago

Correct, the btGImpactMeshShape is what it should be. The btGImpactMeshShape handles dynamic concave shapes. In order for it to work correctly you'll have to ensure you register the btGImpactCollisionAlgorithm. Be aware though that the GImpact stuff does not work well with softbody simulations.

mast4461 commented 5 years ago

Thanks for the prompt reply and tips, @jrz371! I'm trying to add support for dynamic concave mesh colliders to ammo.js, a transpilation of Bullet to JavaScript, for a very specific use case where I don't necessarily need any realtime physics simulation, only on demand collision detection between kinematic rigid bodies with (possibly) concave mesh colliders, or possibly compound shapes consisting of convex meshes.