-
Book Overview & Buying
-
Table Of Contents
Panda3D 1.7 Game Developer's Cookbook
Panda3D has a built-in physics system that treats its entities as simple particles with masses to which forces may be applied. This physics system is a great amount simpler than a fully featured rigid body one. But it still is enough for cheaply, quickly, and easily creating some nice and simple physics effects.
To be prepared for this recipe, please first follow the steps found in Setting up the game structure found in Chapter 1. Also, the collision detection system of Panda3D will be used, so reading up on it in Using the built-in collision detection system might be a good idea!
The following steps are required to work with Panda3D's built-in physics system:
Edit Application.py and add the required import statements as well as the constructor of the Application class:
from direct.showbase.ShowBase import ShowBase
from panda3d.core import *
from panda3d.physics import *
class Application(ShowBase):
def __init__(self):
...
Change the font size
Change margin width
Change background colour