To illustrate I currently have something like
int startX,endX,currX;
int startY,endY,currY;
public void updatePos(){
if(currX<=endX){
currX+=1;
}
//Same for y
I can see that I dont want to move x and y the same amount each time but dont know how to work out what I should do to determine how much each should be adjusted.
Any ideas
Maybe this will help clarify
Imagine I start at these coords (0,0) and I want to get to (18,10)
if I increment my x and y until they reach the desired target by a step of one the sprite moves diagonnally upwards then across the screen to the right before resting in the correct position.
The behaviour I want is that it travels a single direction towards the destination point (along the splope of a triangle if you will)
Im looking for suggestions on how to find my next set of points