private void checkPlanetGravity() {
        Vector3f planetDist = planet.getWorldTranslation().subtract(characterNode.getWorldTranslation());
        if (planetDist.length() < 24) {
            physicsCharacter.setGravity(planetDist.normalizeLocal().multLocal(9.81f));
        } else {
            physicsCharacter.setGravity(normalGravity);
        }
    }
A walking physical character followed by a 3rd person camera. (No animation.)

@author normenhansen, zathras
jme3-examples/src/main/java/jme3test/bullet/TestBetterCharacter.java