Collision Between Instances Having Pathfinding


So I’m working on a top-down zombie game similar to boxhead. The enemy should basically chase the nearest player. I have it all done by a distance condition and pathfinding behavior.
The problem is implementing collision between the enemies themselves considering they are instances of a same object. The action separate two objects worked well but it has some issues with the pathfinding object. The enemies blink uncontrollably suggesting that the collision handler and pathfinding is counteracting each other.
Any ideas on how should I implement collision between instances with pathfinding?
Ps. I’ve tried pathfinding with physics behavior but no luck.


Take the zombie pathfinding demo for example. That’s what I want to achieve, but I don’t want the zombies to step on one another. They should collide with each other instead while still moving toward the player.


behaviors: pathfinding and obstacle for zombie !


This is my exemple project ! i hope that can help you :wink:!9kYQTYbJ!Nwra_vp3kiTRW9yoblZCkN5f0oTknzi97CqKImfzyP4



I tried your project and put top-down behavior to the player but it also glitches as what I’ve said. The enemies blink randomly when they’re close to each other.
Btw where did you put that pathfinding obstacle behavior? I checked your code and can’t seem to find them.


send me your project for i understand better… no glitch with me… i have just two comportment on zombie ! path findingobstactle, and pathfinding !


Try to put top down behavior in your character and move randomly. You will notice that the enemy will bug when they collide to each other.


i think understand ! i have modify the project ! now that seem very good ! tell me if its what you need :wink:


if you need other things, ask me again :wink:


That worked better but there are still some times that the enemies blink and teleport.
I decided to remove the pathfinding behavior and separate objects action then add physics behavior and add manual forces to evade the obstacles.
Physics behavior worked a lot better in handling collisions and so far no blinking stuffs or errors but the problem is manually adding forces for pathfinding which is kinda exhaustive.
This will be a lot easier if we can apply pathfinding and physics behavior at the same time.


okay, i have never use physic behavior… and now, even if its complicated, the result is perfect for you?


Yep. Physics behavior is more precise in handling collisions between objects.