Moving from one co-ordinate to another

I have a character at a co-ordinate, say (3,4) for example, and I need to get him to (10,15). I would like him to move one block every tick or half a second, so that you can see him moving towards his destination. Any ideas on how to achieve this?
search google for path finding algorithms
You have two points, each with an X and a Y coordinate. So find the slope between them and adjust for obstacles accordingly. There are better path finding algorithms of course, such as the popular A*, but the description I gave you is IMO the simplest one to understand.
theres no obstacles, and its a grid, so only integer x and y values.
so for example, from (0,0) to (2,2), i would want it to move up, right, up, right or up, up, right, right, for example
Last edited on
Topic archived. No new replies allowed.