Path finder for obstacle avoidance
Posted: 12 Jan 2011, 06:40
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
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).
Code: Select all
obstacles = {
{x,y,z,r}, {x,y,z,r}, ...
}
The purpose is to constrain a path to avoid known enemies (r being the enemies weapon radius or physical size or los or whatever).