So, to make an ffc move to a point, I need to set its vertical and horizontal speed to that which will move it to the point.
My assumption on how to accomplish this was thus that V=S/t, therefore the speed that I want to give it for horizontal and vertical motion seperately will both be the distance I want it to travel, divided by the time I want it to get there in.
So I have this:
I know it's a bit convuluted, but that's how I've done it. Why should this not work? It's just occured to me that the time that I've set for it to take has no units, so that may be a problem but I was assuming it shouldn't really be.Code:while(true){ x = Link->X; y = Link->Y; a = x - Link->X; b = y - Link->Y; c = a/20; d = b/20; if(this->X < x){this->Vx = c;} if(this->Y < y){this->Vy = d;} if(this->X == x){this->Vx = 0;} if(this->Y == y){this->Vy = 0;} Waitframe(); }