I'm working on a UE4 game! I'm trying to make an enemy move to a random point around the character while ignoring certain things like other enemies, obstacles, etc. I can find out if there are obstacles along the circumference using some fancy tricks I've learned along the way, but I'm stumped on what kind of formula I should use to find a point along the circumference while excluding certain areas of the circle.
With a simple google search I did find that you can find a point on the circumference:
angle = someRandomNumber*(PI)*2;
x = Cos(angle)*radius;
y = Sin(angle)*radius;
Then I plugged those (x,y) coordinates into the enemy and he does walk to the point, but sometimes if there is another enemy or a wall, he will dumbly walk into the object without realizing he can't go there.
So the easiest solution, I think, would be to modify the formula that I'm using to get the point, to exclude areas of the circumference. Would anyone know how to do that?