Note: This only works if the spline nodes are evenly spaced (if not this could help: Equal Length Spline).
Copy to clipboard
int getIndex(Ogre::SimpleSpline* theSpline, float splinePosition) { return floor(splinePosition * (float)theSpline->getNumPoints()); }