Sign in to follow this  

How do I keep enemies from walking over each other?

This topic is 1901 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
Sign in to follow this