@Override
    public void onUpdate(float tpf) {
        traveledDistance = path.interpolatePath(time, this, tpf);
        computeTargetDirection();
    }
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