Enemies avoiding "themselves"

Hi!

I have a problem with the PathFinding system and I am not sure how to solve it.

Is there a way that an object ignores itself as an obstacle?

I have created a bunch of enemies (in different moments). These enemies have places to reach. In order to reach them, I use the PathFinding. I have, as obstacles, some objects and also other enemies, which means, the enemy will avoid “bumping” other enemies.

The problem is, since I set my obstacles to be objects from the obstacles layer and from the Enemies Layer, the enemy will try to “avoid itself”, which leads to weird movements. Is there a way it ignores itself when looking for a path, but not ignore the others?

Is there another way to solve this and I am complicating myself?

I am scanning for obstacles every 2 seconds.

I appreciate any help!

Hey,

Usually people tend to use RVO to avoid other agents, RVO is a local avoidance system that will sort of overrule the movement when needed.

Rvo is only available in the Pro version of A* Pathfinding Project

2 Likes

Thank you for this! I can’t afford the Pro version right now but at least I know there is an option out there! thanks!

1 Like