Support Forum

Enemy sees himself as Obstacle

I have an pathfinding enemy in my 2d game. I want the enemy to see other enemies as a obstacle, but not him self. If I add the Layer Enemies(all Enemies are in this Layer) the Enemyis bugging around, because he see himself as an Obstacle. If I remove the Layer enemies from obstacles, the enemies are going through eachother. How to solve this?
(I know my English is pretty bad)

Hi

Usually the agents are not obstacles in the graph themselves. Usually you use some kind of local avoidance for this, see: https://arongranberg.com/astar/docs/local-avoidance.php

If you are making a turn based game (or a heavily tile based one) then this page might be of interest: https://arongranberg.com/astar/docs/turnbased.html