You have to understand what your for loop is doing
for i = 0,1,1 -- start, destination, increment
That means it will go from 0 to 1 in 1 step (so, immediately)
now as for this...
for i = 0,1,1/100
..this will go from 0 to 1 in 100 steps.
If you need to go downward, you can say..
for i = 1,0,-1/100
and this will go from 1 to 0 in 100 steps.
You can supplement any number into either the start, the goal, or the increment. Just pay attention to which direction you're going so that the increment may be accordingly positive or negative. |