In my program, I'm having an object move back and forth between two points, going faster in the middle. I achieve this using cosine, however it flickers badly at times, and I'm not sure why this happens.
st ends up being a float between 0 and 1, and then I base the coordinates on that.
I'm almost certain I've had this problem before, but I don't remember how I fixed it. The flickering is at its worst when I click the top of the window and release... not just because my use of Millisecs(), though -- it's as if it's drawing in two places at once.
Local st:Float = ((Cos((MilliSecs()/time) Mod 360))+1)/2 Local xdist:Int = x2 - x Local ydist:Int = y2 - y x = xdist*st y = ydist*st
st ends up being a float between 0 and 1, and then I base the coordinates on that.
I'm almost certain I've had this problem before, but I don't remember how I fixed it. The flickering is at its worst when I click the top of the window and release... not just because my use of Millisecs(), though -- it's as if it's drawing in two places at once.