Hi. I am making a game for my school project in panda3d and I’m using panda3d’s bullet for physics. I have a boy 3d model which I want to import it into my game but I don’t know which bullet shape it is. Would you help me with that?
Most popular shape for character controller is capsule, so it’s BulletCapsuleShape in panda.
Is there something like unit’s mesh collide in bullet?
Unless you have a very pressing reason for highly-accurate collision, I recommend against it: it’s likely to be less efficient, and less reliable. If feasible, I recommend a capsule (or sphere).
For completeness, you can find the full list of shapes here.
BulletTriangleMeshShape will give you an shape that exactly matches a mesh, but, as others have pointed out, it is expensive and usually not worth the cost.
BulletConvexHullShapeis a little cheaper for less accuracy (the shape you get would be similar to if you shrink-wrapped an object). However, this is still more expensive than you need. A simple capsule should suffice and is pretty cheap to calculate.
Another issue with an “exact” shape like
BulletTriangleMeshShape is the shape will not be deformed by joints. In other words, it will not animate with the character. You can work around this by re-creating the physics shape every frame, but this gets even more absurdly expensive. An alternative, if you need the accuracy, is to use multiple, simpler shapes (e.g., spheres) and attach them to joints. This moves the shapes with the joints.
Thanks to all of you for your help.