View Full Version : Drawing a line between two points avoiding obsticals

12-06-2007, 08:32 PM

I am making a simple little map type thing in java where the user selects a current location and a desired location, the program should then draw a path to the desired location avoiding the buildings in between.

I have drawn all the buildings using the graphics class on java, and i was planning on joining the points using a poly line, but i am unsure of how to get the line to avoid the buildings, is there maybe a way to detect whether a set point is on a drawn object?

I dont know I have been working on it for a while so my brain is probably fried and its obvous, bu any help would be amazing!

Thanks in advance!