com.jme.input
Class FirstPersonHandler

java.lang.Object
  extended bycom.jme.input.InputHandler
      extended bycom.jme.input.FirstPersonHandler

public class FirstPersonHandler
extends InputHandler

FirsPersonController defines an InputHandler that sets input to be controlled similar to First Person Shooting games. By default the commands are, WSAD moves the camera forward, backward and strafes. The arrow keys rotate and tilt the camera and the mouse also rotates and tilts the camera.

Version:
$Id: FirstPersonHandler.java,v 1.5 2004/10/14 01:23:07 mojomonkey Exp $
Author:
Mark Powell

Field Summary
 
Fields inherited from class com.jme.input.InputHandler
buffKeyActions, keyActions, keyboard, mouse, mouseActions, useBufferedKeyboard
 
Constructor Summary
FirstPersonHandler(AbstractGame app, Camera cam, java.lang.String api)
          Creates a first person handler.
 
Methods inherited from class com.jme.input.InputHandler
addAction, addAction, addBufferedKeyAction, addKeyboardAction, clearKeyboardActions, clearMouseActions, getKeyBindingManager, getMouse, removeAction, removeAction, setKeyBindingManager, setKeySpeed, setMouse, setMouseSpeed, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FirstPersonHandler

public FirstPersonHandler(AbstractGame app,
                          Camera cam,
                          java.lang.String api)
Creates a first person handler. The app is used for the exit action, camera is used for mouse look, and the api string is used to find the correct keyboard input.

Parameters:
app - The application that is exited on an "exit" action.
cam - The camera to move by this handler.
api - The API to create a KeyBindingManager from.