With the exception of karaoke and guitar games like Rock Band or Guitar Hero, it is generally a pretty bad idea to require a specialized controller or other input device for a video game. So, unless you have the marketing budget for advertising your new and special controller, you should always opt to use the most common and most widely available devices.
On consoles you would therefore aim for the standard gamepad, while the most widespread input measure for PC games is a combination of keyboard and mouse. Because Panda3D is targeted towards PC game production, in this example, you will learn how to handle input data received from the latter input method.
This recipe will of course be using our standard application skeleton that we created in the first chapter. Additionally, we will reuse the FollowCam
class from the recipe Making the camera smoothly follow an object in Chapter 2, Creating and Building Scenes. Be sure to implement that class...