This chapter contains the following recipes:
This chapter is about controlling avatars and cameras for various game types. Whether your game is a first person shooter (FPS), role playing game (RPG), or real-time strategy (RTS) game, you'll learn some tricks that will help you get past tricky obstacles.
The chapter will rely heavily on the ActionListener
and AnalogListener
interfaces. These are essential when listening for the player input in jMonkeyEngine. The ActionListener
interface will pick up any binary input such as keyboard keys or mouse buttons. The AnalogListener
interface listens for mouse and joystick movements and other input that is either on or off.
3.133.130.199