private void removeRigidBody(PhysicsRigidBody node) {
        if(!physicsBodies.containsKey(node.getObjectId())){
            logger.log(Level.WARNING, "RigidBody {0} does not exist in PhysicsSpace, cannot remove.", node);
            return;
        }
        if (node instanceof PhysicsVehicle) {
            logger.log(Level.FINE, "Removing vehicle constraint {0} from physics space.", ((PhysicsVehicle) node).getVehicleId());
            physicsVehicles.remove(((PhysicsVehicle) node).getVehicleId());
            dynamicsWorld.removeVehicle(((PhysicsVehicle) node).getVehicleId());
        }
        logger.log(Level.FINE, "Removing RigidBody {0} from physics space.", node.getObjectId());
        physicsBodies.remove(node.getObjectId());
        dynamicsWorld.removeRigidBody(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