protected void rotateCamera() {
        verticalRotation = FastMath.clamp(verticalRotation, minVerticalRotation, maxVerticalRotation);
        TempVars vars = TempVars.get();
        Quaternion rot = vars.quat1;
        Quaternion rot2 = vars.quat2;
        rot.fromAngleNormalAxis(verticalRotation, leftVector);
        rot2.fromAngleNormalAxis(horizontalRotation, upVector);
        rot2.multLocal(rot);
        target.setLocalRotation(rot2);
        vars.release();
    }
rotate the camera around the target
jme3-core/src/main/java/com/jme3/app/ChaseCameraAppState.java