Page 1 of 1

Path finder for obstacle avoidance

Posted: 12 Jan 2011, 06:40
by SpliFF
I need a way to call Spring.FindShortestPath(movetype, start, end, obstacles) and get back a path object that never passes too close to an obstacle. The syntax of obstacles would be

Code: Select all

obstacles = {
   {x,y,z,r}, {x,y,z,r}, ...
}
Where r is the radius of the obstacle.

The purpose is to constrain a path to avoid known enemies (r being the enemies weapon radius or physical size or los or whatever).