How do I restrict the character to moving only horizontally and vertically? So that, if the target is to left and down of him, he would go west and then south (or south and then west, whatever) instead of choosing the shortest route and going southwest?
Do you mean way points? I have to admit, I haven't figured out how they are supposed to work. I create the borders, put some way points inside, but my character still moves around freely, ignoring those points.