private void removeGhostObject(PhysicsGhostObject node) {
        if(!physicsGhostObjects.containsKey(node.getObjectId())){
            logger.log(Level.WARNING, "GhostObject {0} does not exist in PhysicsSpace, cannot remove.", node);
            return;
        }
        physicsGhostObjects.remove(node.getObjectId());
        logger.log(Level.FINE, "Removing ghost object {0} from physics space.", node.getObjectId());
        dynamicsWorld.removeCollisionObject(node.getObjectId());
    }
Removes all physics controls and joints in the given spatial from the physics space
(e.g. before saving to disk) - recursive if node
@param spatial the rootnode containing the physics objects
jme3-jbullet/src/main/java/com/jme3/bullet/PhysicsSpace.java