I've added a trace in to make sure that I'm getting the right values for iInterpolation:
And here's the output from that:
So it's not that iInterpolation is set to a negative value - but the fact that you might have thought that now leads me to think that I'm doing something wrong somewhere else...
Code:
iInterpolation = (iAccumulator/millistep);
trace("iInterpolation is "+iInterpolation+" - ("+iAccumulator+'/'+millistep+')');
trace("iInterpolation is "+iInterpolation+" - ("+iAccumulator+'/'+millistep+')');
And here's the output from that:
Code:
iInterpolation is 0.25 - (5/20)
iInterpolation is 0.45 - (9/20)
iInterpolation is 0.65 - (13/20)
iInterpolation is 0.85 - (17/20)
iInterpolation is 0.05 - (1/20)
iInterpolation is 0.85 - (17/20)
iInterpolation is 0.05 - (1/20)
iInterpolation is 0.45 - (9/20)
iInterpolation is 0.65 - (13/20)
iInterpolation is 0.85 - (17/20)
iInterpolation is 0.05 - (1/20)
iInterpolation is 0.85 - (17/20)
iInterpolation is 0.05 - (1/20)
So it's not that iInterpolation is set to a negative value - but the fact that you might have thought that now leads me to think that I'm doing something wrong somewhere else...