public void checkWayPoint(MotionEvent control, float tpf) {
        //Epsilon varies with the tpf to avoid missing a waypoint on low framerate.
        float epsilon = tpf * 4f;
        if (control.getCurrentWayPoint() != prevWayPoint) {
            if (control.getCurrentValue() >= 0f && control.getCurrentValue() < epsilon) {
                triggerWayPointReach(control.getCurrentWayPoint(), control);
                prevWayPoint = control.getCurrentWayPoint();
            }
        }
    }
interpolate the path giving the time since the beginning and the motionControl
this methods sets the new localTranslation to the spatial of the MotionEvent control.
@param time the time since the animation started
@param control the control over the moving spatial
@param tpf time per frame (in seconds)
@return the distance travelled (in world units)
jme3-core/src/main/java/com/jme3/cinematic/MotionPath.java