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

Inspecting and modifying the scene


Panda3D is a great engine for quickly developing prototypes of games, because creating and modifying scenes works quick and easy. But sometimes quick is not fast enough and restarting the game to see a change taking effect is a frustrating and repetitive task. This is why Panda3D provides the scene explorer, which we will use in the following recipe.

Getting ready

The following instructions are going to modify the code created in the recipe Loading models and actors, which can be found in this chapter.

How to do it...

The following tasks will introduce you to the features of the scene explorer:

  1. Add the highlighted lines to Application.py:

    from panda3d.core import Vec3
    from pandac.PandaModules import loadPrcFileData
    
    loadPrcFileData("", "want-directtools #t")
    loadPrcFileData("", "want-tk #t")
    
    class Application(ShowBase):
        def __init__(self):
  2. Press F6 to start the application. Next to the game window, you will see the screenshot similar to this:

  3. Push the Wireframe...