I am trying to figure out how to write an AI avoidance algorithm for a game so as not to step on lava areas. The safe distance from the center of the lava object is a static range of 25. If it were only 1 lava object, I would calculate the distance between the Player and the Object, then calculate the angle and move the range x back to 25 range.
But since there can be more than 1 lava object, each of which has a radius of action of 25 radii. All 3 must be taken into account, otherwise it can move away from 1 and go to another.
Any help would be appreciated.

source share