As a sample for integrating a third party library that is not built into Panda3D into a game, this recipe dives into the C++ side of Panda3D to create a scene that is driven by the excellent and free Bullet physics engine.
This recipe builds on the project setup described in Creating a scene using C++ found in Chapter 2. Follow the steps of this recipe before proceeding!
You also need a copy of the Bullet source code. The latest version can be retrieved from this website: http://code.google.com/p/bullet/downloads/list.
Integrating the Bullet physics engine into a Panda3D program involves these tasks:
In the top-level solution directory, create a directory named
Lib
.Unpack the Bullet source code into the
Lib
directory so that the top-level directory, containing the fileAUTHORS
and the directorymsvc
, of Bullet isLib\bullet-2.77
.Navigate to the
msvc\2008
subdirectory of the Bullet source tree and open the fileBULLET_PHYSICS...