A great way to make scenes more interesting is to present them from multiple points of view. This can give a more cinematic feel to a game or might even be a plain necessity if you think of the TV-like replays found in most racing games.
After completing this recipe you will be able to add multiple cameras to the scene and switch between these predefined views.
To follow this recipe, complete the steps described in Setting up the game structure found in Chapter 1 before going on.
Let's create a new scene and look at it from different angles:
Add the highlighted code to
Application.py
:from direct.showbase.ShowBase import ShowBase from direct.actor.Actor import Actor from direct.interval.FunctionInterval import Func class Application(ShowBase): def __init__(self): ShowBase.__init__(self) self.pandaActor = Actor("panda", {"walk": "panda-walk"}) self.pandaActor.reparentTo(render) self.pandaActor.loop("walk...