4

I am trying to create a concave moving shape using bullet physics SDK but cannot find how to do it.

Do you have any idea on how to achieve this?

Ben
  • 2,314
  • 1
  • 19
  • 36
AP.
  • 5,205
  • 7
  • 50
  • 94

2 Answers2

3

I would suggest looking at "MovingConcaveDemo" which is in the Bullet SDK examples.

The project file is named "bullet-2.75\msvc\8appMovingConcaveDemo.vcproj" (where bullet-2.75 is the current version right now) if you're using Visual Studio 2008 but there are other projects as well for other IDEs.

Adisak
  • 6,708
  • 38
  • 46
2

I just had this exact problem, bullet has shapes for doing this, but collisions did not work properly for me with those shapes, so I broke up my concave shape into lots of convex ones, did it using a btCompoundShape, with lots of btConvexHullShape as children. To break up a convex shape into triangles (which I just used as 3 point hulls), I used this class:

http://www.flipcode.com/archives/Efficient_Polygon_Triangulation.shtml

Hope this helps, contact me if you want the exact code (it is very tied in to my program though).

Karl Glaser
  • 829
  • 2
  • 10
  • 17
  • 1
    the Bullet convex decomposition demo does exactly this, using HACD to perform the convex decomposition automatically. All convex hull shapes are stored in a btCompoundShape. – Erwin Coumans Jun 06 '15 at 05:44