O'Reilly logo

Learning Game Physics with Bullet Physics and OpenGL by Chris Dickinson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Convex hulls

Next, we'll explore how Bullet lets us build custom collision shapes through the use of convex hulls.

Note

Continue from here using the Chapter7.2_ConvexHulls project files.

Much like our OpenGL code, we provide the vertex points from which to build the object and Bullet takes care of the hard work for us; in fact Bullet makes it even easier than that, because we don't need to define indices or provide them in a specific order of rotation. Bullet will always try to create the simplest convex shape it can from the given set of points (also known as a point cloud or vertex cloud in this context). It is important for the objects to be convex because it is orders of magnitude is easier to calculate collisions with convex shapes (those ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required