🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

How do I keep enemies from walking over each other?

Started by
1 comment, last by IADaveMark 11 years, 8 months ago
How do I keep enemies from walking over each other? If I look at games like Torchlight, Diablo, etc. where there is clear view of the surrounding monsters, I notice that the enemies never walk over each other. I have just implemented the Simple Path scripts in my Unity3D game, but I want to make it so that my enemies do not ever occupy the same space. I cannot simply enable physics collisions; this would result in enemies potentially getting stuck. What is the most common way of achieving enemy/obstacle avoidance while correctly path finding?
Advertisement
I'm confused as to why they would be stuck. Wouldn't the solution be to have the NPC/enemy change direction when they run into something that is not the player?

Beginner in Game Development?  Read here. And read here.

 

Steering

Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

This topic is closed to new replies.

Advertisement