Get distance along spline from world location

you can also factor in the last spline position to get the new spline position. This is the algorithm I use for my game since the character goes though jumps, loops, slow motion etc all based on physical forces, and I needed the exact location down to the 0.1 unit.