I am playing around with custom movement trying to get a block to move a certain set distance distance, say 200 pixels on a mouse press and then stop when it has done it.
I don't want that distance covered instantly on the mouse press, but for the block to move smoothly at a pre defined speed.(it can accelerate/decelerate but needs to cover a set distance)
However I also want the speed the block covers that distance to increase if i press the mouse button again before the blocks movement has finished, so if i press it twice then the block will have to move 400 pixels but the speed it covers those pixels will increase, and will increase again if i press the mouse button even sooner for a 3rd time. If i slow the pressing down then the speed drops.
so I can have 2,3,4 or more blocks moving 200 pixels at a time (grid like) across the screen like a train and carriage on a mouse press, each time i click the mouse they all move again, speeding up or slowing down depending on the speed of the clicking.
Would anyone have an idea of how to approach this? I have been trying a few ways but haven't got anything I am happy with yet.