@Override
  public void onAnalog(String name, float value, float tpf) {
    if (name.equals("moveForward")) {
      teaGeom.move(0, 0, -5 * tpf);
    }
    if (name.equals("moveBackward")) {
      teaGeom.move(0, 0, 5 * tpf);
    }
    if (name.equals("moveRight")) {
      teaGeom.move(5 * tpf, 0, 0);
    }
    if (name.equals("moveLeft")) {
      teaGeom.move(-5 * tpf, 0, 0);

    }

  }
A 3rd-person chase camera orbits a target (teapot). 
Follow the teapot with WASD keys, rotate by dragging the mouse.
jme3-examples/src/main/java/jme3test/input/TestChaseCameraAppState.java