@Override
  public void simpleInitApp() {
    // load a teapot model 
    Geometry teaGeom 
            = (Geometry) assetManager.loadModel("Models/Teapot/Teapot.obj");
    Material mat = new Material(assetManager, "Common/MatDefs/Misc/ShowNormals.j3md");
    teaGeom.setMaterial(mat);
    //create a node to attach the geometry and the camera node
    teaNode = new Node("teaNode");
    teaNode.attachChild(teaGeom);
    rootNode.attachChild(teaNode);
    // create a floor
    mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
    mat.setTexture("ColorMap", assetManager.loadTexture("Interface/Logo/Monkey.jpg"));
    Geometry ground = new Geometry("ground", new RectangleMesh(
            new Vector3f(-25, -1, 25),
            new Vector3f(25, -1, 25),
            new Vector3f(-25, -1, -25)));
    ground.setMaterial(mat);
    rootNode.attachChild(ground);

    //creating the camera Node
    CameraNode camNode = new CameraNode("CamNode", cam);
    // Set the direction to SpatialToCamera, which means the camera will copy the movements of the Node.
    camNode.setControlDir(ControlDirection.SpatialToCamera);
    //attaching the camNode to the teaNode
    teaNode.attachChild(camNode);
    //setting the local translation of the cam node to move it away from the tea Node a bit
    camNode.setLocalTranslation(new Vector3f(-10, 0, 0));
    //setting the camNode to look at the teaNode
    camNode.lookAt(teaNode.getLocalTranslation(), Vector3f.UNIT_Y);

    //disable the default 1st-person flyCam (don't forget this!!)
    flyCam.setEnabled(false);

    registerInput();
  }
A 3rd-person camera node follows a target (teapot).  Follow the teapot with
WASD keys, rotate by dragging the mouse.
jme3-examples/src/main/java/jme3test/input/TestCameraNode.java