@Override
  public void simpleInitApp() {
    // Load a teapot model
    teaGeom = (Geometry) assetManager.loadModel("Models/Teapot/Teapot.obj");
    Material mat_tea = new Material(assetManager, "Common/MatDefs/Misc/ShowNormals.j3md");
    teaGeom.setMaterial(mat_tea);
    rootNode.attachChild(teaGeom);

    // Load a floor model
    Material mat_ground = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
    mat_ground.setTexture("ColorMap", assetManager.loadTexture("Interface/Logo/Monkey.jpg"));
    Geometry ground = new Geometry("ground", new Quad(50, 50));
    ground.setLocalRotation(new Quaternion().fromAngleAxis(-FastMath.HALF_PI, Vector3f.UNIT_X));
    ground.setLocalTranslation(-25, -1, 25);
    ground.setMaterial(mat_ground);
    rootNode.attachChild(ground);
    
    //disable the flyCam
    stateManager.detach(stateManager.getState(FlyCamAppState.class));   
       
    // Enable a chase cam  
    ChaseCameraAppState chaseCamAS = new ChaseCameraAppState();
    chaseCamAS.setTarget(teaGeom);
    stateManager.attach(chaseCamAS);
 
    //Uncomment this to invert the camera's vertical rotation Axis 
    //chaseCamAS.setInvertVerticalAxis(true);

    //Uncomment this to invert the camera's horizontal rotation Axis
    //chaseCamAS.setInvertHorizontalAxis(true);

    //Uncomment this to enable rotation when the middle mouse button is pressed (like Blender)
    // WARNING: setting this trigger disables the rotation on right and left mouse button click
    //chaseCamAS.setToggleRotationTrigger(new MouseButtonTrigger(MouseInput.BUTTON_MIDDLE));

    //Uncomment this to set multiple triggers to enable rotation of the cam
    //Here space bar and middle mouse button
    //chaseCamAS.setToggleRotationTrigger(new MouseButtonTrigger(MouseInput.BUTTON_MIDDLE),new KeyTrigger(KeyInput.KEY_SPACE));

    //registering inputs for target's movement
    registerInput();

  }
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