According to this tutorial, a convex hull is the most accurate shape one can build from a mesh? I have two questions regarding this:

  1. How do I build a convex hull from a given, complex mesh in Bullet?
  2. Should this be done offline? How do most people do this? (that is, create a collision shape from a mesh in games)

You can do it using btConvexHullShape, calling the addPoint method. But that's usually not what you want. You should manually make a much much simpler collision mesh in your 3D modeling tool. Collision meshes don't have to be detailed. Use only a few triangles.

A good way to create an accurate representation is to use a compound shape (btCompoundShape) made of convex shapes since working with concave shapes directly is cumbersome. Here I explain how to export .bullet files from Blender which can then be imported in Bullet using btBulletWorldImporter http://xissburg.com/post/export-bullet-from-blender/


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.