Hello it seems my post has been confusing readers( I might even deter others from helping me). SO I edited the orignal post.
I no longer want movement through vector normalization, I am not totally verbose in math, what I mean is, going from point to another point using vectors. Because it works great at first, but there are instances that makes the AI Path Finding don't look nice in the game I am making.
What I want now is moving horizontally and vertically without even normalizing the vector. Is there anyway I could do it? Also, I don't have any means to detect whether the next tile in question is on left, right, top, bottom of the sprite. I heavily rely on delta of sprite position to target position( by subtracting sprite position to target position) to give me the sign whether to move the sprite horizontal or vertical.
Just try to imagine you are moving sprite using keyboard, but this time the input is the position of the next tile. Usually in keyboard you move your sprite at ( -10 , 0 ) if you wanna go left etc. This time it's different it has a mind of its own the only input it needs is the position of its next adjacent tile.
for example:
My Sprite is on position( 60.0f , 60.0f )
the generated path is:
60.0f , 120.0f // go down
60.0f , 180.0f // go down once more
120.0f , 180.0f // go right
I have to go to the path 120.0f, 180.0f. That's my input for my sprite on how it going to move around. I just gave it coordinates were to go. My question is, How can I go from (60.0f , 60.0f) to (60.0f , 120.0f) at the first loop up until the last tile at( 120.0f , 180.0f )? I don't like normalizing vectors anymore, my code actually works using that but there are times it cuts corners when my sprite was trapped between 2 tiles when I issued a new order (I haven't fixed that yet but as soon as I finish this one).
I hope it really clear things up.
This problem has been bothering me eversince, I could not sleep and my sleeping pattern is heavily disrupted by this one.