How do I keep enemies from walking over each other?
Started by storm33229, Nov 02 2012 07:10 PM
2 replies to this topic
#1 Members - Reputation: 125
Posted 02 November 2012 - 07:10 PM
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?
Ad:
#2 Crossbones+ - Reputation: 3295
Posted 02 November 2012 - 08:41 PM
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.
Super Mario Bros clone tutorial written in XNA 4.0 [MonoGame, ANX, and MonoXNA] by Scott Haley
If you have found any of the posts helpful, please show your appreciation by clicking the up arrow on those posts ![]()
Spoiler
#3 Moderators - Reputation: 1861
Posted 02 November 2012 - 10:45 PM
Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
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!"
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-advisor of the GDC AI Summit
Co-founder of the AI Game Programmers Guild
Author of the book, Behavioral Mathematics for Game AI
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!"






