Collision detection that ignores self but returns hits with other objects of the same layerMask

hi, I am building a simple game were the player controls a tank and battles with several other AI tanks. I have managed to build the path find AI so that the tanks can seek the player when he is not visible . When they see the player they ignore the pathfinding waypoints and just home into the player. This works fine so far. My problem is that I want the AI enemies to avoid bumping in each other. This is a complex task but to accomplish this I need to implement a type of Ray casting that detects the other AI enemies that are standing in the way. The problem is that all AI enemies have the same layer so if I use a layer mask the cast will include collisions with the tank that is casting. Is there a way that I can sphere cast from an object that ignores itself but at the same time detects other objects that have the same layer. Best regards robert

I managed to solve this. I used triggers and increased the size of the ai tank Germany colliders. When a tank collides with another tank, the one behind will slow down.

Hi, i have the same issue, could you please explaing how you solved this ? Thanks.