public void setCycle(boolean cycle) {

        spline.setCycle(cycle);
        if (debugNode != null) {
            Node parent = debugNode.getParent();
            debugNode.removeFromParent();
            debugNode.detachAllChildren();
            debugNode = null;
            attachDebugNode(parent);
        }

    }
Sets the path to be a cycle

@param cycle true for a cycle, false for a non-cycle
jme3-core/src/main/java/com/jme3/cinematic/MotionPath.java