Chapter 4. Taking Control: Events and User Input
In addition to tasks, we have one more system in Panda3D that we can use to control dynamic elements in our game: events. In this chapter, we're going to use events and tasks to set up our cycle so that the player can move it around the track. We're also going to set up some important rules for our cycle's movement, such as acceleration and simulating drift.
This is what we'll talk about:
Working with events
Using keyboard events
Implementing advanced cycle controls
Utilizing mouse input and creating camera control
Ending event response
The event system is vital to making our game respond to anything other than the passage of time. It's not too complicated, but we still need to pay attention and make sure we don't miss anything!