Book Image

Panda3D 1.7 Game Developer's Cookbook

Book Image

Panda3D 1.7 Game Developer's Cookbook

Overview of this book

Table of Contents (20 chapters)
Panda3D 1.7 Game Developer's Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Integrating the Bullet physics engine


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.

Getting ready

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.

How to do it...

Integrating the Bullet physics engine into a Panda3D program involves these tasks:

  1. In the top-level solution directory, create a directory named Lib.

  2. Unpack the Bullet source code into the Lib directory so that the top-level directory, containing the file AUTHORS and the directory msvc, of Bullet is Lib\bullet-2.77.

  3. Navigate to the msvc\2008 subdirectory of the Bullet source tree and open the file BULLET_PHYSICS...