@Override
    public void write(JmeExporter ex) throws IOException {
        super.write(ex);
        OutputCapsule oc = ex.getCapsule(this);
        oc.write(lookAt, "lookAt", null);
        oc.write(upVector, "upVector", Vector3f.UNIT_Y);
        oc.write(rotation, "rotation", null);
        oc.write(directionType, "directionType", Direction.None);
        oc.write(path, "path", null);
        oc.write(spatial, "spatial", null);
    }
Creates a MotionPath for the given spatial on the given motion path.

@param spatial the Spatial to move (not null)
@param path the path to be taken (alias created)
@param initialDuration the desired duration (in seconds, default=10)
@param loopMode (default=DontLoop)
jme3-core/src/main/java/com/jme3/cinematic/events/MotionEvent.java